remove linux.install and _tkt.preset files
This commit is contained in:
365
PKGBUILD
365
PKGBUILD
@@ -1,258 +1,203 @@
|
|||||||
# Maintainer: Thomas Kuschel <thomas@kuschel.at>
|
# Maintainer: Thomas Kuschel (oe3tkt) <oe3tkt@gmail.com>
|
||||||
|
# copied from Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
||||||
|
|
||||||
pkgbase=linux-tkt
|
pkgbase=linux-tom
|
||||||
_srcname=linux
|
pkgver=5.17.3.arch1
|
||||||
_gitver=v5.17.1
|
pkgrel=6
|
||||||
_patchver=20220315
|
pkgdesc='Linux'
|
||||||
# patchver=master
|
_srctag=v${pkgver%.*}-${pkgver##*.}
|
||||||
_patchname=more-uarches-for-kernel-5.17+.patch
|
url="https://github.com/archlinux/linux/commits/$_srctag"
|
||||||
pkgver=5.17.v.1
|
arch=(x86_64)
|
||||||
pkgrel=3
|
license=(GPL2)
|
||||||
|
makedepends=(
|
||||||
arch=('x86_64')
|
bc libelf pahole cpio perl tar xz
|
||||||
url="https://www.kernel.org/"
|
xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
|
||||||
license=('GPL2')
|
git
|
||||||
makedepends=('kmod' 'inetutils' 'bc' 'git' 'libelf' 'lzop' 'gcc>=10.3')
|
)
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
|
_srcname=archlinux-linux
|
||||||
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=$_gitver"
|
source=(
|
||||||
# the main kernel config files
|
"$_srcname::git+https://github.com/archlinux/linux?signed#tag=$_srctag"
|
||||||
'config-tkt.x86_64'
|
config # the main kernel config file
|
||||||
# standard config files for mkinitcpio ramdisk
|
)
|
||||||
"${pkgbase}.preset"
|
validpgpkeys=(
|
||||||
# linux package install directives for pacman
|
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||||
'linux.install'
|
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||||
# patch from our graysky archlinux colleague, at https://github.com/graysky2/kernel_compiler_patch
|
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
|
||||||
"https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/$_patchver/$_patchname"
|
'C7E7849466FE2358343588377258734B41C31549' # David Runge <dvzrv@archlinux.org>
|
||||||
)
|
)
|
||||||
sha256sums=('SKIP'
|
sha256sums=('SKIP'
|
||||||
#config-tkt.x86_64
|
'1c7e7d4fbaa10bc95087776f20367124c66cb39abf09e029d70ef3c8a34422df')
|
||||||
'6999f8b7fa09f634c43627a75ea8f430cc49b54248f890a3f55e34e4a2619153'
|
|
||||||
#.preset file linux-tkt.preset
|
|
||||||
'f1eaf5f24b251b823ff6991119b4bc80df5ba22065803b7bd2f1f09d1bd06e0e'
|
|
||||||
#linux install file
|
|
||||||
'd590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0'
|
|
||||||
#grayskypatch
|
|
||||||
'dea86a521603414a8c7bf9cf1f41090d5d6f8035ce31407449e25964befb1e50'
|
|
||||||
)
|
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
export KBUILD_BUILD_HOST=archlinux
|
||||||
|
export KBUILD_BUILD_USER=$pkgbase
|
||||||
pkgver() {
|
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
|
||||||
echo $pkgver
|
|
||||||
}
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${_srcname}"
|
cd $_srcname
|
||||||
if [ "${CARCH}" = "x86_64" ]; then
|
|
||||||
cat "${srcdir}/config-tkt.x86_64" > ./.config
|
|
||||||
else
|
|
||||||
echo "Sorry, non x86_64 arch not supported."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
echo "Setting version..."
|
||||||
sed -i '2iexit 0' scripts/depmod.sh
|
scripts/setlocalversion --save-scmversion
|
||||||
|
echo "-$pkgrel" > localversion.10-pkgrel
|
||||||
|
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||||
|
|
||||||
# Implement all packaged patches.
|
local src
|
||||||
msg2 "Implementing custom kernel patches"
|
for src in "${source[@]}"; do
|
||||||
while read patch; do
|
src="${src%%::*}"
|
||||||
echo "Applying $patch"
|
src="${src##*/}"
|
||||||
git apply $patch || exit 2
|
[[ $src = *.patch ]] || continue
|
||||||
done <<< $(ls ../*.patch)
|
echo "Applying patch $src..."
|
||||||
|
patch -Np1 < "../$src"
|
||||||
|
done
|
||||||
|
|
||||||
# get kernel version
|
echo "Setting config..."
|
||||||
msg2 "Preparing kernel"
|
cp ../config .config
|
||||||
yes "" | make prepare
|
make olddefconfig
|
||||||
|
diff -u ../config .config || :
|
||||||
|
|
||||||
# load configuration
|
make -s kernelrelease > version
|
||||||
msg2 "Preparing config"
|
echo "Prepared $pkgbase version $(<version)"
|
||||||
# Configure the kernel. Replace the line below with one of your choice.
|
|
||||||
#make menuconfig # CLI menu for configuration
|
|
||||||
#make nconfig # new CLI menu for configuration
|
|
||||||
#make xconfig # X-based configuration
|
|
||||||
#make oldconfig # using old config from previous kernel version
|
|
||||||
make olddefconfig # old config from previous kernel, defaults for new options
|
|
||||||
# ... or manually edit .config
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${_srcname}"
|
cd $_srcname
|
||||||
|
make all
|
||||||
#old: Force zenv2 architecture optimisation.
|
make htmldocs
|
||||||
# Force the local machine instruction subsets (hence the result might not run on different machines)
|
|
||||||
export CFLAGS="-march=native -mtune=native -O2 -pipe -fstack-protector-strong"
|
|
||||||
export CXXFLAGS="${CFLAGS}"
|
|
||||||
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_package() {
|
_package() {
|
||||||
pkgdesc="Linux kernel aimed at the native CPU based hardware"
|
pkgdesc="The $pkgdesc kernel and modules"
|
||||||
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'lzop')
|
depends=(coreutils kmod initramfs)
|
||||||
optdepends=('crda: to set the correct wireless channels of your country')
|
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
|
||||||
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
'linux-firmware: firmware images needed for some devices')
|
||||||
install=linux.install
|
provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
|
||||||
|
replaces=(virtualbox-guest-modules-arch wireguard-arch)
|
||||||
|
|
||||||
cd "${_srcname}"
|
cd $_srcname
|
||||||
|
local kernver="$(<version)"
|
||||||
|
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||||
|
|
||||||
KARCH=x86
|
echo "Installing boot image..."
|
||||||
|
# systemd expects to find the kernel here to allow hibernation
|
||||||
|
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
|
||||||
|
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
|
||||||
|
|
||||||
# get kernel version
|
# Used by mkinitcpio to name the kernel
|
||||||
_kernver="$(make LOCALVERSION= kernelrelease)"
|
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
||||||
_basekernel=${_kernver%%-*}
|
|
||||||
_basekernel=${_basekernel%.*}
|
|
||||||
|
|
||||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
echo "Installing modules..."
|
||||||
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
|
||||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
DEPMOD=/doesnt/exist modules_install # Suppress depmod
|
||||||
|
|
||||||
# set correct depmod command for install
|
|
||||||
cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
|
|
||||||
true && install=${install}.pkg
|
|
||||||
sed \
|
|
||||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \
|
|
||||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
|
|
||||||
-i "${startdir}/${install}"
|
|
||||||
|
|
||||||
# install mkinitcpio preset file for kernel
|
|
||||||
install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
|
||||||
sed \
|
|
||||||
-e "1s|'linux.*'|'${pkgbase}'|" \
|
|
||||||
-e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
|
|
||||||
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
|
|
||||||
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \
|
|
||||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
|
||||||
|
|
||||||
# remove build and source links
|
# remove build and source links
|
||||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
rm "$modulesdir"/{source,build}
|
||||||
# remove the firmware
|
|
||||||
rm -rf "${pkgdir}/lib/firmware"
|
|
||||||
# make room for external modules
|
|
||||||
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
|
||||||
# add real version for building modules and running depmod from post_install/upgrade
|
|
||||||
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
|
|
||||||
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
|
|
||||||
|
|
||||||
# Now we call depmod...
|
|
||||||
depmod -b "${pkgdir}" -F System.map "${_kernver}"
|
|
||||||
|
|
||||||
# move module tree /lib -> /usr/lib
|
|
||||||
mkdir -p "${pkgdir}/usr"
|
|
||||||
mv "${pkgdir}/lib" "${pkgdir}/usr/"
|
|
||||||
|
|
||||||
# add vmlinux
|
|
||||||
install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
|
|
||||||
|
|
||||||
# add vmlinuz in /usr/lib/modules/ and info for correct hook triggers
|
|
||||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/usr/lib/modules/${_kernver}/vmlinuz"
|
|
||||||
echo ${pkgbase} > "${pkgdir}/usr/lib/modules/${_kernver}/pkgbase"
|
|
||||||
|
|
||||||
# add System.map
|
|
||||||
install -D -m644 System.map "${pkgdir}/boot/System.map-${_kernver}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_package-headers() {
|
_package-headers() {
|
||||||
pkgdesc="Header files and scripts for building modules for Linux kernel aimed at the local CPU based hardware"
|
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
|
||||||
|
depends=(pahole)
|
||||||
|
|
||||||
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
cd $_srcname
|
||||||
|
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||||
|
|
||||||
cd "${_srcname}"
|
echo "Installing build files..."
|
||||||
install -D -m644 Makefile \
|
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
|
||||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
localversion.* version vmlinux
|
||||||
install -D -m644 kernel/Makefile \
|
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
|
||||||
install -D -m644 .config \
|
cp -t "$builddir" -a scripts
|
||||||
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
|
||||||
|
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
# required when STACK_VALIDATION is enabled
|
||||||
|
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
|
||||||
|
|
||||||
for i in $(ls include/); do
|
# required when DEBUG_INFO_BTF_MODULES is enabled
|
||||||
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
|
||||||
|
|
||||||
|
echo "Installing headers..."
|
||||||
|
cp -t "$builddir" -a include
|
||||||
|
cp -t "$builddir/arch/x86" -a arch/x86/include
|
||||||
|
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||||
|
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/13146
|
||||||
|
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/20402
|
||||||
|
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/71392
|
||||||
|
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||||
|
|
||||||
|
echo "Installing KConfig files..."
|
||||||
|
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||||
|
|
||||||
|
echo "Removing unneeded architectures..."
|
||||||
|
local arch
|
||||||
|
for arch in "$builddir"/arch/*/; do
|
||||||
|
[[ $arch = */x86/ ]] && continue
|
||||||
|
echo "Removing $(basename "$arch")"
|
||||||
|
rm -r "$arch"
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy arch includes for external modules
|
echo "Removing documentation..."
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86"
|
rm -r "$builddir/Documentation"
|
||||||
cp -a arch/x86/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86/"
|
|
||||||
|
|
||||||
# copy files necessary for later builds, like nvidia and vmware
|
echo "Removing broken symlinks..."
|
||||||
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||||
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
|
||||||
|
|
||||||
# Make tmpdir for versions
|
echo "Removing loose objects..."
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
# add kernel files to headers
|
echo "Stripping build tools..."
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
local file
|
||||||
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
while read -rd '' file; do
|
||||||
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
case "$(file -bi "$file")" in
|
||||||
|
application/x-sharedlib\;*) # Libraries (.so)
|
||||||
# add dm headers
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
application/x-archive\;*) # Libraries (.a)
|
||||||
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
strip -v $STRIP_STATIC "$file" ;;
|
||||||
|
application/x-executable\;*) # Binaries
|
||||||
# add inotify.h
|
strip -v $STRIP_BINARIES "$file" ;;
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
application/x-pie-executable\;*) # Relocatable binaries
|
||||||
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
|
||||||
# add wireless headers
|
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
|
||||||
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
|
||||||
|
|
||||||
# copy in Kconfig files
|
|
||||||
for i in $(find . -name "Kconfig*"); do
|
|
||||||
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
|
||||||
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Fix file conflict with -doc package
|
|
||||||
rm "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild"/Kconfig.*-*
|
|
||||||
rm "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/Kconfig"
|
|
||||||
|
|
||||||
# Add objtool for CONFIG_STACK_VALIDATION
|
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools"
|
|
||||||
cp -a tools/objtool "${pkgdir}/usr/lib/modules/${_kernver}/build/tools"
|
|
||||||
|
|
||||||
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
|
||||||
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
|
||||||
|
|
||||||
# strip scripts directory
|
|
||||||
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
|
||||||
case "$(file -bi "${binary}")" in
|
|
||||||
*application/x-sharedlib*) # Libraries (.so)
|
|
||||||
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
|
||||||
*application/x-archive*) # Libraries (.a)
|
|
||||||
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
|
||||||
*application/x-executable*) # Binaries
|
|
||||||
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
|
||||||
esac
|
esac
|
||||||
done
|
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||||
|
|
||||||
# remove unneeded architectures
|
echo "Stripping vmlinux..."
|
||||||
while read modarch; do
|
strip -v $STRIP_STATIC "$builddir/vmlinux"
|
||||||
rm -rf $modarch
|
|
||||||
done <<< $(find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/ -maxdepth 1 -mindepth 1 -type d | grep -v /x86$)
|
|
||||||
|
|
||||||
|
echo "Adding symlink..."
|
||||||
|
mkdir -p "$pkgdir/usr/src"
|
||||||
|
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||||
}
|
}
|
||||||
|
|
||||||
_package-docs() {
|
_package-docs() {
|
||||||
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel"
|
pkgdesc="Documentation for the $pkgdesc kernel"
|
||||||
|
|
||||||
cd "${_srcname}"
|
cd $_srcname
|
||||||
|
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||||
|
|
||||||
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
echo "Installing documentation..."
|
||||||
cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
local src dst
|
||||||
find "${pkgdir}" -type f -exec chmod 444 {} \;
|
while read -rd '' src; do
|
||||||
find "${pkgdir}" -type d -exec chmod 755 {} \;
|
dst="${src#Documentation/}"
|
||||||
|
dst="$builddir/Documentation/${dst#output/}"
|
||||||
# remove a file already in linux package
|
install -Dm644 "$src" "$dst"
|
||||||
rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
|
done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
|
||||||
|
|
||||||
|
echo "Adding symlink..."
|
||||||
|
mkdir -p "$pkgdir/usr/share/doc"
|
||||||
|
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
|
||||||
}
|
}
|
||||||
|
|
||||||
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
|
pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
|
||||||
for _p in ${pkgname[@]}; do
|
for _p in "${pkgname[@]}"; do
|
||||||
eval "package_${_p}() {
|
eval "package_$_p() {
|
||||||
$(declare -f "_package${_p#${pkgbase}}")
|
$(declare -f "_package${_p#$pkgbase}")
|
||||||
_package${_p#${pkgbase}}
|
_package${_p#$pkgbase}
|
||||||
}"
|
}"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
# mkinitcpio preset file for the 'linux-tkt' package
|
|
||||||
|
|
||||||
ALL_config="/etc/mkinitcpio.conf"
|
|
||||||
ALL_kver="/boot/vmlinuz-linux-tkt"
|
|
||||||
|
|
||||||
export COMPRESSION="lzop"
|
|
||||||
|
|
||||||
PRESETS=('default' 'fallback')
|
|
||||||
|
|
||||||
#default_config="/etc/mkinitcpio.conf"
|
|
||||||
default_image="/boot/initramfs-linux-tkt.img"
|
|
||||||
#default_options=""
|
|
||||||
|
|
||||||
#fallback_config="/etc/mkinitcpio.conf"
|
|
||||||
fallback_image="/boot/initramfs-linux-tkt-fallback.img"
|
|
||||||
fallback_options="-S autodetect"
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# arg 1: the new package version
|
|
||||||
# arg 2: the old package version
|
|
||||||
|
|
||||||
KERNEL_NAME=
|
|
||||||
KERNEL_VERSION=
|
|
||||||
|
|
||||||
post_install () {
|
|
||||||
# updating module dependencies
|
|
||||||
echo ">>> Updating module dependencies. Please wait ..."
|
|
||||||
depmod ${KERNEL_VERSION}
|
|
||||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
|
||||||
mkinitcpio -p linux${KERNEL_NAME}
|
|
||||||
}
|
|
||||||
|
|
||||||
post_upgrade() {
|
|
||||||
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
|
|
||||||
echo "WARNING: /boot appears to be a separate partition but is not mounted."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# updating module dependencies
|
|
||||||
echo ">>> Updating module dependencies. Please wait ..."
|
|
||||||
depmod ${KERNEL_VERSION}
|
|
||||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
|
||||||
mkinitcpio -p linux${KERNEL_NAME}
|
|
||||||
|
|
||||||
if [ $(vercmp $2 3.13) -lt 0 ]; then
|
|
||||||
echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
|
|
||||||
echo ">>> In order to use your keyboard during early init, you MUST"
|
|
||||||
echo ">>> include the 'keyboard' hook in your mkinitcpio.conf."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
post_remove() {
|
|
||||||
# also remove the compat symlinks
|
|
||||||
rm -f boot/initramfs-linux${KERNEL_NAME}.img
|
|
||||||
rm -f boot/initramfs-linux${KERNEL_NAME}-fallback.img
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user