summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-02-24 14:54:24 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-02-24 14:54:24 +0100
commit38666e5b98bea165f59a78707bd15581e3d66ca6 (patch)
tree726055713085a25c81a91074120d18424c955d8e
parent145dedaf3e1278d909c83b648651f139cec80bad (diff)
downloadlinux-pinebook-38666e5b98bea165f59a78707bd15581e3d66ca6.tar.gz
linux-pinebook-38666e5b98bea165f59a78707bd15581e3d66ca6.tar.bz2
linux-pinebook-38666e5b98bea165f59a78707bd15581e3d66ca6.zip
Removed non-functining headers package for now.
-rw-r--r--PKGBUILD101
1 files changed, 1 insertions, 100 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 40fd512..f5fca79 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -107,106 +107,7 @@ _package() {
rm "$modulesdir"/{source,build}
}
-_package-headers() {
- pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
- provides=("linux-headers=${pkgver}")
- conflicts=('linux-headers')
-
- cd $_srcname
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
- echo "Installing build files..."
- install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
- localversion.* version vmlinux
- install -Dt "$builddir/kernel" -m644 kernel/Makefile
- install -Dt "$builddir/arch/arm64" -m644 arch/arm64/Makefile
- cp -t "$builddir" -a scripts
-
- # add objtool for external module building and enabled VALIDATION_STACK option
- install -Dt "$builddir/tools/objtool" tools/objtool/objtool
-
- # add xfs and shmem for aufs building
- mkdir -p "$builddir"/{fs/xfs,mm}
-
- echo "Installing headers..."
- cp -t "$builddir" -a include
- cp -t "$builddir/arch/arm64" -a arch/arm64/include
- install -Dt "$builddir/arch/arm64/kernel" -m644 arch/arm64/kernel/asm-offsets.s
-
- install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
- install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
-
- # http://bugs.archlinux.org/task/13146
- install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
-
- # http://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
-
- echo "Installing KConfig files..."
- find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
-
- echo "Removing unneeded architectures..."
- local arch
- for arch in "$builddir"/arch/*/; do
- [[ $arch = */arm64/ ]] && continue
- echo "Removing $(basename "$arch")"
- rm -r "$arch"
- done
-
- echo "Removing documentation..."
- rm -r "$builddir/Documentation"
-
- echo "Removing broken symlinks..."
- find -L "$builddir" -type l -printf 'Removing %P\n' -delete
-
- echo "Removing loose objects..."
- find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
-
- echo "Stripping build tools..."
- local file
- while read -rd '' file; do
- case "$(file -bi "$file")" in
- application/x-sharedlib\;*) # Libraries (.so)
- strip -v $STRIP_SHARED "$file" ;;
- application/x-archive\;*) # Libraries (.a)
- strip -v $STRIP_STATIC "$file" ;;
- application/x-executable\;*) # Binaries
- strip -v $STRIP_BINARIES "$file" ;;
- application/x-pie-executable\;*) # Relocatable binaries
- strip -v $STRIP_SHARED "$file" ;;
- esac
- done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
-
- echo "Stripping vmlinux..."
- strip -v $STRIP_STATIC "$builddir/vmlinux"
-
- echo "Adding symlink..."
- mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
-}
-
-_package-docs() {
- pkgdesc="Documentation for the $pkgdesc kernel"
-
- 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" "$pkgbase-docs")
+pkgname=("$pkgbase")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")