summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoranthraxx2019-10-18 01:25:31 +0200
committeranthraxx2019-10-18 01:25:31 +0200
commit6004f1aeee1ee573d02635d07400a020ece9fb59 (patch)
tree9917801819b3ef885eeef5be4393f332fcb79671 /PKGBUILD
parenta11342efdf54518ce1161b9975595d85a5be9439 (diff)
downloadaur-6004f1aeee1ee573d02635d07400a020ece9fb59.tar.gz
update PKGBUILD to match upstream changes for initcpio etc
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 13 insertions, 23 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b50fc1e48c4..e8296662f29 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -71,8 +71,8 @@ prepare() {
cp ../config.x86_64 .config
make olddefconfig
- make -s kernelrelease > ../version
- msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
+ make -s kernelrelease > version
+ msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
}
build() {
@@ -82,34 +82,29 @@ build() {
_package() {
pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
- [[ $pkgbase = linux ]] && groups=(base)
- depends=(coreutils linux-firmware kmod mkinitcpio)
+ depends=(coreutils kmod initramfs)
optdepends=('crda: to set the correct wireless channels of your country'
+ 'linux-firmware: firmware images needed for some devices'
'usbctl: deny_new_usb control')
backup=("etc/mkinitcpio.d/$pkgbase.preset")
install=linux.install
+ cd ${pkgbase/-git/}
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
- cd ${pkgbase/-git/}
-
msg2 "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"
install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-${pkgbase/-git/}"
+ # Used by mkinitcpio to name the kernel
+ echo "${pkgbase/-git/}" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
+
msg2 "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
- # a place for external modules,
- # with version file for building modules and running depmod from hook
- local extramodules="extramodules$_kernelname"
- local extradir="$pkgdir/usr/lib/modules/$extramodules"
- install -Dt "$extradir" -m644 ../version
- ln -sr "$extradir" "$modulesdir/extramodules"
-
# remove build and source links
rm "$modulesdir"/{source,build}
@@ -118,7 +113,6 @@ _package() {
local subst="
s|%PKGBASE%|${pkgbase/-git/}|g
s|%KERNVER%|$kernver|g
- s|%EXTRAMODULES%|$extramodules|g
"
# hack to allow specifying an initially nonexisting install file
@@ -140,12 +134,12 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
cd ${pkgbase/-git/}
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
- install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux
+ install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
+ localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
@@ -156,9 +150,6 @@ _package-headers() {
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
- # ???
- mkdir "$builddir/.tmp_versions"
-
msg2 "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
@@ -212,7 +203,7 @@ _package-headers() {
msg2 "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver"
+ ln -sr "$builddir" "$pkgdir/usr/src/${pkgbase/-git/}"
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
@@ -221,9 +212,8 @@ _package-headers() {
_package-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
cd ${pkgbase/-git/}
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing documentation..."
mkdir -p "$builddir"