diff options
author | Jonathan Wright | 2020-11-04 21:09:28 +0000 |
---|---|---|
committer | Jonathan Wright | 2020-11-04 21:09:28 +0000 |
commit | c1e84beb5c85e5ff8b3ceae5cbe723bdfd80c8fc (patch) | |
tree | 44283225d86df11414718eff1933cf98fa945f98 | |
parent | bdf248f7bc57125b0d2a31831a14f986911a16be (diff) | |
download | aur-c1e84beb5c85e5ff8b3ceae5cbe723bdfd80c8fc.tar.gz |
Update PKGBUILD to current release & support -docs
This includes updates from the current 5.9.2 release of the mainline
Arch Linux kernel, removing the old fixes for permissions, adding
support for the new linux-git-docs package, and removing msg2 calls in
favour of echo.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 72 |
2 files changed, 60 insertions, 30 deletions
@@ -1,6 +1,6 @@ pkgbase = linux-git - pkgdesc = Linux git - pkgver = 5.10rc1.r5.g41ba50b0572e + pkgdesc = Linux (Git) + pkgver = 5.10rc2.r81.g4ef8451b3326 pkgrel = 1 url = https://www.kernel.org arch = x86_64 @@ -10,6 +10,11 @@ pkgbase = linux-git makedepends = libelf makedepends = git makedepends = pahole + makedepends = xmlto + makedepends = python-sphinx + makedepends = python-sphinx_rtd_theme + makedepends = graphviz + makedepends = imagemagick options = !strip source = git+https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux source = config @@ -17,13 +22,18 @@ pkgbase = linux-git sha256sums = a01c8ef3463c239f868fa679006bc591b1a088274dde8c9c162440dd0547ccad pkgname = linux-git - pkgdesc = The Linux git kernel and modules + pkgdesc = The Linux (Git) kernel and modules depends = coreutils depends = kmod depends = initramfs optdepends = crda: to set the correct wireless channels of your country optdepends = linux-firmware: firmware images needed for some devices + provides = WIREGUARD-MODULE + replaces = wireguard-arch pkgname = linux-git-headers - pkgdesc = Headers and scripts for building modules for the Linux git kernel + pkgdesc = Headers and scripts for building modules for the Linux (Git) kernel + +pkgname = linux-git-docs + pkgdesc = Documentation for the Linux (Git) kernel @@ -3,13 +3,16 @@ # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> pkgbase=linux-git -pkgver=5.10rc1.r5.g41ba50b0572e +pkgver=5.10rc2.r81.g4ef8451b3326 pkgrel=1 -pkgdesc='Linux git' +pkgdesc='Linux (Git)' url="https://www.kernel.org" arch=(x86_64) license=(GPL2) -makedepends=(bc kmod libelf git pahole) +makedepends=( + bc kmod libelf git pahole + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick +) options=('!strip') _srcname=linux source=( @@ -32,7 +35,7 @@ pkgver() { prepare() { cd $_srcname - msg2 "Setting version..." + echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname @@ -42,21 +45,22 @@ prepare() { src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue - msg2 "Applying patch $src..." + echo "Applying patch $src..." patch -Np1 < "../$src" done - msg2 "Setting config..." + echo "Setting config..." cp ../config .config make olddefconfig make -s kernelrelease > version - msg2 "Prepared %s version %s" "$pkgbase" "$(<version)" + echo "Prepared $pkgbase version $(<version)" } build() { cd $_srcname - make bzImage modules + make all + make htmldocs } _package() { @@ -64,12 +68,14 @@ _package() { depends=(coreutils kmod initramfs) optdepends=('crda: to set the correct wireless channels of your country' 'linux-firmware: firmware images needed for some devices') + provides=(WIREGUARD-MODULE) + replaces=(wireguard-arch) cd $_srcname local kernver="$(<version)" local modulesdir="$pkgdir/usr/lib/modules/$kernver" - msg2 "Installing boot image..." + 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" @@ -77,14 +83,11 @@ _package() { # Used by mkinitcpio to name the kernel echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" - msg2 "Installing modules..." + echo "Installing modules..." make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install # remove build and source links rm "$modulesdir"/{source,build} - - msg2 "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" } _package-headers() { @@ -93,7 +96,7 @@ _package-headers() { cd $_srcname local builddir="$pkgdir/usr/lib/modules/$(<version)/build" - msg2 "Installing build files..." + echo "Installing build files..." install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \ localversion.* version vmlinux install -Dt "$builddir/kernel" -m644 kernel/Makefile @@ -106,7 +109,7 @@ _package-headers() { # add xfs and shmem for aufs building mkdir -p "$builddir"/{fs/xfs,mm} - msg2 "Installing headers..." + 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 @@ -122,10 +125,10 @@ _package-headers() { install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h - msg2 "Installing KConfig files..." + echo "Installing KConfig files..." find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \; - msg2 "Removing unneeded architectures..." + echo "Removing unneeded architectures..." local arch for arch in "$builddir"/arch/*/; do [[ $arch = */x86/ ]] && continue @@ -133,16 +136,16 @@ _package-headers() { rm -r "$arch" done - msg2 "Removing documentation..." + echo "Removing documentation..." rm -r "$builddir/Documentation" - msg2 "Removing broken symlinks..." + echo "Removing broken symlinks..." find -L "$builddir" -type l -printf 'Removing %P\n' -delete - msg2 "Removing loose objects..." + echo "Removing loose objects..." find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete - msg2 "Stripping build tools..." + echo "Stripping build tools..." local file while read -rd '' file; do case "$(file -bi "$file")" in @@ -157,18 +160,35 @@ _package-headers() { esac done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0) - msg2 "Stripping vmlinux..." + echo "Stripping vmlinux..." strip -v $STRIP_STATIC "$builddir/vmlinux" - msg2 "Adding symlink..." + echo "Adding symlink..." mkdir -p "$pkgdir/usr/src" ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" +} + +_package-docs() { + pkgdesc="Documentation for the $pkgdesc kernel" - msg2 "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" + cd $_srcname + local builddir="$pkgdir/usr/lib/modules/$(<version)/build" + + echo "Installing documentation..." + local src dst + while read -rd '' src; do + dst="${src#Documentation/}" + dst="$builddir/Documentation/${dst#output/}" + install -Dm644 "$src" "$dst" + 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") + +pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") |