summaryrefslogtreecommitdiff
path: root/libre/linux-libre-pck/PKGBUILD
diff options
context:
space:
mode:
authorDavid P <megver83@openmailbox.org>2017-10-05 15:51:56 -0300
committerDavid P <megver83@openmailbox.org>2017-10-05 15:51:56 -0300
commite15286065e604ddcb93402db0e3b19df2db72bf4 (patch)
tree70102020ea7f6d986b2462d1eea7dab1f7d5f916 /libre/linux-libre-pck/PKGBUILD
parent69c66ada695ff468d3fa8695d923c60ee2fe8474 (diff)
downloadabslibre-e15286065e604ddcb93402db0e3b19df2db72bf4.tar.gz
abslibre-e15286065e604ddcb93402db0e3b19df2db72bf4.tar.bz2
abslibre-e15286065e604ddcb93402db0e3b19df2db72bf4.zip
updpkg: libre/linux-libre-pck 4.13.4-1.pck1
Diffstat (limited to 'libre/linux-libre-pck/PKGBUILD')
-rw-r--r--libre/linux-libre-pck/PKGBUILD239
1 files changed, 88 insertions, 151 deletions
diff --git a/libre/linux-libre-pck/PKGBUILD b/libre/linux-libre-pck/PKGBUILD
index 825d0ddca..0be3391e5 100644
--- a/libre/linux-libre-pck/PKGBUILD
+++ b/libre/linux-libre-pck/PKGBUILD
@@ -11,8 +11,8 @@
# Based on linux-zen package
pkgbase=linux-libre-pck
-_pkgbasever=4.12-gnu
-_pkgver=4.12.14-gnu
+_pkgbasever=4.13-gnu
+_pkgver=4.13.4-gnu
_pckpatchver=pck1
_replacesarchkernel=('linux-zen')
@@ -23,11 +23,11 @@ _srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}.${_pckpatchver}
pkgrel=1
-rcnrel=armv7-x3
+rcnrel=armv7-x1
arch=('i686' 'x86_64' 'armv7h')
url="https://wiki.parabola.nu/PCK"
license=('GPL2')
-makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf')
+makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
makedepends_armv7h=('git')
options=('!strip')
source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign}
@@ -53,11 +53,11 @@ source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/l
'0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch'
'0008-disable-USB3-port-on-ODROID-XU.patch'
'0009-ARM-dove-enable-ethernet-on-D3Plug.patch')
-sha512sums=('d5586dba2e4deeb42ffe98c9305111da56e0741bb4508642d103367a0ef712c837e160366c3656d18f0d636fcd5b60c27593cb9216e10025d6abc74e6cdb05e4'
+sha512sums=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c2777d7f4191831008b532cb2ab6f686d8c4f457a4d005226c73f90937963518'
'SKIP'
- 'ff1123fe05e96a59cb661c2d42a48651952e7a3c8732b7eea0b93acf93c05228a3a05fd3ef06d53d04e3fde26b25f4f87e401b5ac323bdaf2e029db0aef3429c'
+ 'b77f21d69363ce69a4dae7ffd6b436fa49b66e0be8c234aae4e2f42a590de5ea23179fade9b2269b34d94f69a0184577d846cd8e13c1f41fb011ab5b4f6d1441'
'SKIP'
- '80b7a6ffadfd3fce9f13b4ad631770846ef59941965fec341dcb8b32911ee3fdb34636f10441114f3945b9f9e6c95bdb58650890dd5033660edc6ba899e9bb8c'
+ '2310acb2e41a976237358f78dacfbc4e6bdfbb7087be3941ab7b65de83609080ea0d2f8ee75abf94fc0cfc483321c427966fed27c912aa80692e55765e6e6f23'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -65,12 +65,12 @@ sha512sums=('d5586dba2e4deeb42ffe98c9305111da56e0741bb4508642d103367a0ef712c837e
'SKIP'
'7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78'
'SKIP'
- '4dcd45d53669b141e0c8357b7844dccf9bfd9d5ae20361a6b51e8e0717afc304bbf5d3a23d3cf9a1592924d445b4ded1f6170c213b9978c0282c6bb5cd5adbe6'
- '12f9ba968d4199abc8df621fed9e8651fcb757d6f3ed26e4d1e94ca99cc68106bcb0c468a3ff47e59e052af08399120031c475b74b225a3e2585457dc3269405'
- 'b7370b0acbfbe398bcc717980a7c7e2bcc2d5992a47d9e6802c28eb97b6d2deea6315d72d58191985ac557bffc3df9d08d263771bb1a619969d46a4f0d75b483'
+ 'f8429cbdaca095b5d7c02dc2a5ab80c7983dc4cdf1ba3dcf82528f0979449edef79693289f532fe5c2efe07ffa8bc1057ad23fbc6ce184775a30cc834b0d9099'
+ 'a083c92df2567e8878747dc4dc46a4b07db62c40cea6ef26944f98f732ac1ef117fe813c0486bd4aff078316bffb710a921401328eb80560be78612acda9c37e'
+ '5e4dc801c40ec333c5b2933f645e57c85577428adffb8252ad28ad224974e929432199fc6ba5fe2803eabf9a4337ed08e6bb48691439d2c2479ae160559daddb'
'd6faa67f3ef40052152254ae43fee031365d0b1524aa0718b659eb75afc21a3f79ea8d62d66ea311a800109bed545bc8f79e8752319cd378eef2cbd3a09aba22'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
- 'b6c8ba1cb5c1ae04a5fb22f5721341bfb6eac4b6b913b9ac88d2d44d3fe7700cc82318c52564e0cdca7670f6d47142866e0c4b4a85193a321abafc1c49bd2841'
+ '1f944e50157721ae9b74643fed62b6786a53e9e89d96b249fea607438bff445af2cbc1af1e0133c91e0510d59b25652cf57bddb184cfe031a3279736373ffcf4'
'SKIP'
'8da49af5cce12f0bf21f5985cf85d13624404bab76cc0fd7a04b3ee6c046b5dceb4ae0bb821e060405366310473042892e716f530f04d1dab9a21ca1f778dd6c'
'06f40e0f197b15dffc7c724aba9a41f2343c8528576700202f069d5cd00013e7e5e8d62153cf358d02c21e28d7cf2a66e3f5190677cb590ac07f36be58b43cab'
@@ -94,15 +94,15 @@ case "${CARCH}" in
esac
prepare() {
- cd "${srcdir}/${_srcname}"
+ cd ${_srcname}
# add upstream patch
if [ "${_pkgbasever}" != "${_pkgver}" ]; then
- patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}"
+ patch -p1 -i ../patch-${_pkgbasever}-${_pkgver}
fi
# add PCK patch
- patch -p1 -i "${srcdir}/patch-${_pkgver}-${_pckpatchver}.patch"
+ patch -p1 -i ../patch-${_pkgver}-${_pckpatchver}.patch
if [ "${CARCH}" = "armv7h" ]; then
# RCN patch (CM3 firmware deblobbed and AUFS removed)
@@ -130,7 +130,7 @@ prepare() {
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
- cat "${srcdir}/config.${CARCH}" > ./.config
+ cp -Tf ../config.${CARCH} .config
# append pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile
@@ -154,7 +154,7 @@ prepare() {
}
build() {
- cd "${srcdir}/${_srcname}"
+ cd ${_srcname}
if [ "${CARCH}" = "armv7h" ]; then
make ${MAKEFLAGS} LOCALVERSION= zImage modules dtbs
@@ -168,15 +168,14 @@ _package() {
[ "${pkgbase}" = "linux-libre" ] && groups=('base' 'base-openrc')
depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country'
- 'systemd-knock: to use system and service manager with TCP Stealth support'
'openssh-knock: to use SSH with TCP Stealth support')
- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_archpkgver}" "kernel=${_archpkgver}")
+ provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_archpkgver}")
conflicts=("${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
replaces=("${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux.install
- cd "${srcdir}/${_srcname}"
+ cd ${_srcname}
# get kernel version
_kernver="$(make LOCALVERSION= kernelrelease)"
@@ -200,23 +199,26 @@ _package() {
# install mkinitcpio preset file for kernel
if [ "${CARCH}" = "armv7h" ]; then
sed "s|/boot/vmlinuz-%PKGBASE%|${_kernver}|g
- s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" |
- install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+ s|%PKGBASE%|${pkgbase}|g" ../linux.preset |
+ install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" |
- install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+ sed "s|%PKGBASE%|${pkgbase}|g" ../linux.preset |
+ install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
fi
# install pacman hook for initramfs regeneration
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/90-linux.hook" |
- install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
+ sed "s|%PKGBASE%|${pkgbase}|g" ../90-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
# remove build and source links
- rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
+ rm "${pkgdir}"/lib/modules/${_kernver}/{source,build}
+
# remove the firmware
- rm -rf "${pkgdir}/lib/firmware"
+ rm -r "${pkgdir}/lib/firmware"
+
# make room for external modules
ln -s "../extramodules-${_basekernel}${_kernelname}" "${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}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version"
@@ -225,12 +227,11 @@ _package() {
depmod -b "${pkgdir}" -F System.map "${_kernver}"
# move module tree /lib -> /usr/lib
- mkdir -p "${pkgdir}/usr"
- mv "${pkgdir}/lib" "${pkgdir}/usr/"
+ mv -t "${pkgdir}/usr" "${pkgdir}/lib"
if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
# add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
+ install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
fi
}
@@ -240,139 +241,76 @@ _package-headers() {
conflicts=("${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesoldkernels[@]/%/-headers}")
- install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- cd "${srcdir}/${_srcname}"
- install -D -m644 Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
- install -D -m644 kernel/Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
- install -D -m644 .config \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
+ install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
+ install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
+ mkdir "${_builddir}/.tmp_versions"
+
+ cp -t "${_builddir}" -a include scripts
- for i in acpi asm-generic config crypto drm generated keys linux math-emu \
- media net pcmcia scsi soc sound trace uapi video xen; do
- cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
- done
-
- # copy arch includes for external modules
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}"
- cp -a arch/${KARCH}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
- if [ "${CARCH}" = "armv7h" ]; then
- for i in dove exynos omap2; do
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}"
- cp -a arch/${KARCH}/mach-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-${i}/"
- done
- for i in omap orion samsung versatile; do
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}"
- cp -a arch/${KARCH}/plat-${i}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-${i}/"
- done
- fi
-
- # copy files necessary for later builds
- cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
-
- # fix permissions on scripts dir
- chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
+ install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
+ install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
-
- cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
-
- if [ "${CARCH}" = "i686" ]; then
- cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ if [[ ${CARCH} = i686 ]]; then
+ install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu
fi
- cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
-
- # add docbook makefile
- install -D -m644 Documentation/DocBook/Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
-
- # add dm headers
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
- cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
-
- # add inotify.h
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
- cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
-
- # 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/"
+ cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
- # add dvb headers for external modules
- # in reference to:
- # http://bugs.archlinux.org/task/9912
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
- cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
- # and...
- # http://bugs.archlinux.org/task/11194
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
- cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
-
- # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
- # in reference to:
+ install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
+ install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
+
+ # http://bugs.archlinux.org/task/9912
+ install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
+
# http://bugs.archlinux.org/task/13146
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
- cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
+ install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/lgdt330x.h
+ install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
- # add dvb headers
- # in reference to:
# http://bugs.archlinux.org/task/20402
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
- cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
- cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
- cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
+ 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
# add xfs and shmem for aufs building
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
- # removed in 3.17-gnu series
- # cp fs/xfs/xfs_sb.h "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs/xfs_sb.h"
-
+ mkdir -p "${_builddir}"/{fs/xfs,mm}
+
# 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
+ find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
# add objtool for external module building and enabled VALIDATION_STACK option
- if [ -f tools/objtool/objtool ]; then
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool"
- cp -a tools/objtool/objtool ${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool/
+ if [[ -e tools/objtools/objtool ]]; then
+ install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
fi
- 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
+ # remove unneeded architectures
+ local _arch
+ for _arch in "${_builddir}"/arch/*/; do
+ if [[ ${_arch} != */${KARCH}/ ]]; then
+ rm -r "${_arch}"
+ fi
done
- # remove unneeded architectures
- find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "$KARCH" -exec rm -rf {} +
+ # remove files already in linux-docs package
+ rm -r "${_builddir}/Documentation"
+
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
- # remove files already in docs package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-01"
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-02"
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.select-break"
+ # strip scripts directory
+ local _binary _strip
+ while read -rd '' _binary; do
+ case "$(file -bi "${_binary}")" in
+ *application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
+ *application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
+ *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
+ *) continue ;;
+ esac
+ /usr/bin/strip ${_strip} "${_binary}"
+ done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
}
_package-docs() {
@@ -381,15 +319,14 @@ _package-docs() {
conflicts=("${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesoldkernels[@]/%/-docs}")
- cd "${srcdir}/${_srcname}"
-
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
- find "${pkgdir}" -type f -exec chmod 444 {} \;
- find "${pkgdir}" -type d -exec chmod 755 {} \;
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- # remove a file already in kernel package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+ mkdir -p "${_builddir}"
+ cp -t "${_builddir}" -a Documentation
+
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
}
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")