summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-knock/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/linux-libre-knock/PKGBUILD')
-rw-r--r--kernels/linux-libre-knock/PKGBUILD270
1 files changed, 103 insertions, 167 deletions
diff --git a/kernels/linux-libre-knock/PKGBUILD b/kernels/linux-libre-knock/PKGBUILD
index ab998a3df..8a412a54a 100644
--- a/kernels/linux-libre-knock/PKGBUILD
+++ b/kernels/linux-libre-knock/PKGBUILD
@@ -1,5 +1,4 @@
# Maintainer: David P. <megver83@parabola.nu>
-# Maintainer: Jesús E. <heckyel@parabola.nu>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar>
@@ -11,9 +10,9 @@
# Based on linux package
pkgbase=linux-libre-knock
-_pkgbasever=4.11-gnu
-_pkgver=4.11.12-gnu
-_knockpatchver=4.11_1
+_pkgbasever=4.13-gnu
+_pkgver=4.13.9-gnu
+_knockpatchver=4.13_1
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
_replacesoldkernels=() # '%' gets replaced with _kernelname
@@ -23,11 +22,11 @@ _srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}
pkgrel=1
-rcnrel=armv7-x0
+rcnrel=armv7-x2
arch=('i686' 'x86_64' 'armv7h')
url="https://gnunet.org/knock"
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}
@@ -47,22 +46,21 @@ source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/l
'0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
'0002-fix-Atmel-maXTouch-touchscreen-support.patch'
# armv7h patches
-# "https://repo.parabola.nu/other/rcn-libre/patches/${_pkgver%-*}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
+ "https://repo.parabola.nu/other/rcn-libre/patches/${_pkgver%-*}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
'0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
'0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
'0003-SMILE-Plug-device-tree-file.patch'
'0004-fix-mvsdio-eMMC-timing.patch'
'0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
- '0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch'
- '0007-set-default-cubietruck-led-triggers.patch'
- '0008-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch'
- '0009-disable-USB3-port-on-ODROID-XU.patch'
- '0010-ARM-dove-enable-ethernet-on-D3Plug.patch')
-sha512sums=('f1d9138024b127385248de5c8eb72123b717bbbaba3e80bded20f073acac816a7ea979c4677ddc72252a8ec77c6a6c1d1738b1c20106f7d53ef39c9cf64c1853'
+ '0006-set-default-cubietruck-led-triggers.patch'
+ '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=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c2777d7f4191831008b532cb2ab6f686d8c4f457a4d005226c73f90937963518'
'SKIP'
- '68a2665f6ef29aa3ba08321990f743663dab03bae178b2ca0beccf6e9384e440a3ff86006b8da3b197bbf8d1d05c0b5f1aac8a44521b2dae08fe06399de59795'
+ '12221d0eb85f30eace8fac389c27d3455df11475c466b600c466a2cb843435a406cf663547cb7a0aa8340ac4bd178ba4e694136e5172c1c396bd033ab840ac4e'
'SKIP'
- '96fde93542d39e25956e7b7402c51b4d9c9512e98124285865abb675c6b8abf52b6d2136352c654e26ca847acfa2ff21616ee3b8a4cd9d45d942fb4c6d930e2f'
+ '32ec2d08bf049352bad741144680332b1cb5da43d46e98f333e3b94e71a9d10255e9689bf78d64c367cbbbe6b98d1a163ded756942248cbc968b460cc144d058'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -70,23 +68,24 @@ sha512sums=('f1d9138024b127385248de5c8eb72123b717bbbaba3e80bded20f073acac816a7ea
'SKIP'
'7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78'
'SKIP'
- '5c9c77c5f87d0256d61229bdccdf30315edb6889ab2463c7027c397e56216f67089a36c814368f34d5b058433e7bcfd243effd4812bf366790502fb27395b80c'
- 'bd97bea90f98b27fc74cceb1739003bc0e545a200859911cf559228ca8198b4b145193ae5118bc10a59d30de0c1af2532111f21e4034fcf986d926b460abe71a'
- '690acc32582594b0fe1ecd97ead462cdfe2c048fe448f842507e702c1ed0f1a4935c6ef8082541d4a23fe638f8ced75c16b9eec6e1962e493e59ecad84875471'
+ '806c492bc900be82efece49446b368bdfadd46156f54c90568570623ea473c2b358ce7ff598b33b28d9fb7cccd3e9072f4d91d4e3670434738faeda5b18ab7c0'
+ '4387bb4a9f90a15e5d657e44f1a489e4dfb9334e5831d6a688b23fb72b5141bb1b93775c5f71513e040fedf95bb3660aa141287c579b01ed3c4de5dfd9c6e455'
+ '1061dd0a61206245e4dc476fde3ee1c2e5f5fa3c5b4438b52aeab55830edbe10d87b7850b223cd40bc00e2e174e663bc87f39e4d475610ed29a7be12f71fb31b'
'd6faa67f3ef40052152254ae43fee031365d0b1524aa0718b659eb75afc21a3f79ea8d62d66ea311a800109bed545bc8f79e8752319cd378eef2cbd3a09aba22'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
'02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
- '1d550ee87d3c35b4022c23feb771f9a40c34bead6eb8dc5e92cd767417723b32bcb7e0608419aa2b8a4f3306c183447d9ae713d33df68102b1c2df4e267cee39'
- 'cca509462861ac85e6229bd2bf5f5e0e4d2d2db182cf1d562f765862eb192ade5917a9e0306375642c1090143fae6826129fd531435658d906e6a8f88982ddef'
- '8bff227b9b52b7cf9981c7224a1032abce2955488e4c21494f11c07c96d3999fe920d494ff715baa7bf6071d828f7d22533640b7bc9ac0ad7ab47021156e0f69'
- '6b870843e8bfee9944befaddf3c4544442d550ccb2d91e5b9eddbb7ea5f48115c6815d4635d6418d3cb8d1013e9dbaf6a3c16fb75f778e215a32d582543ed38e'
- '7864004635ed568d951eb85ba55b342b844a655abe160b30590b1d980afc12cdbc8ce235e76c92d7ff287c3847d31e5085a215ba42c453c60dca079790103d04'
- 'c00a187921dddbf6712b74af4c439d87a646ec8db3e28e59e279f919e889b9369593dabdc1e4943901b3b0a0ed50a3e910fde03e19f74f74de9591799aee9680'
- 'c33811f633adbefad6e6a1dc73e9b64a594fae3dc06b0970f4f59b11372c3c1a626fda8ff2effca09a2a7630d1dbe4d81aaf371eb04a71d72b345576da8521da'
- 'e51b1d296daa73759d9e932a4d0f72f7e4d6b53c7fa0edb0191f0cd69affe6deba2a4dd6a28165d4861d9b7117fc21190997e691d34b32bb9c96b7dc7c358c63'
- 'b36238543e6dcaa3b6086618fb0eab108480d1224898548205f56a174911d38ce140b8206636c093ad6670987e09bd8a55c7d84ab5512bc6cda45260a1031a59'
- '3b17a9b3aac558f739320b50c84ecb44affbb26709b0f970b6f6e8f96b56aee644d92f61a0cf27c774a6c347dfc3676b4b657c4cac9ff678fb12c59fc7bcdc80')
+ '1507b924cfc415398ee8972d61d669e501481e95a41d4851aae467f2e8894760842b0b89e1dad4f0791abe85d0e67fa995eefbfcf716ace8acbe8626a1d57314'
+ 'SKIP'
+ '8da49af5cce12f0bf21f5985cf85d13624404bab76cc0fd7a04b3ee6c046b5dceb4ae0bb821e060405366310473042892e716f530f04d1dab9a21ca1f778dd6c'
+ '06f40e0f197b15dffc7c724aba9a41f2343c8528576700202f069d5cd00013e7e5e8d62153cf358d02c21e28d7cf2a66e3f5190677cb590ac07f36be58b43cab'
+ '9ebb57495958cfcd64f82c6dbfc823ea724d888ac6991bc983981b9a4791c0691a7aba3f7358ec8c853a4e06f098d674a7bd410beb653e0f3bb6c2cd9baad254'
+ '42e4c7235301c476c47e8fad82117773fe362fc7a037ab18f78cef808e6d7868aea4671e89ea95f7fe8ba84a42f7d5425c8f5cca1049327775a6a83db9ff7afb'
+ 'b02a0886168ff3b17ff3963b518e95c94a8ecb17409381a6e4f6ee06e6f352667f0b6f8d78e39509c54bacf4c29224f67eaf514b261625a951d35fcdd809d1f6'
+ '47643f83377377e7b878a78b42cb5c4261390d70912fff3e41fed8f4ec750077e62291451bde098032e199d152efb89cbe9058ffa341838f411df03e5b2cb9cb'
+ 'af61d42d03ae4624feee5b31e699f7f16596a2b5556a43a42e773d00ab35b72ed60777b17c75acfd690f590376fba4000efda310cb628e3788f30c970bcc7e10'
+ 'ef47eb4cbe69d1eab683c6b4f9ea17cc2e193e14e58e4d93da3f082401aedd8a3218a30a680a077724fda698f37389fa1a216781779b59e6bd17f44dfa569d3d'
+ '880f625458fe7d3f5cb7d5701f2c3e094a62a1965af2c9a1520724d0142d3535211f52bdbe1318c230e6fdb3fdfbf511a83bd81ba7e117ecbc7dcb87193286c1')
validpgpkeys=(
'474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
'6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P.
@@ -103,7 +102,7 @@ case "${CARCH}" in
esac
prepare() {
- cd "${srcdir}/${_srcname}"
+ cd ${_srcname}
# add upstream patch
if [ "${_pkgbasever}" != "${_pkgver}" ]; then
@@ -126,11 +125,10 @@ prepare() {
patch -p1 -i "${srcdir}/0003-SMILE-Plug-device-tree-file.patch"
patch -p1 -i "${srcdir}/0004-fix-mvsdio-eMMC-timing.patch"
patch -p1 -i "${srcdir}/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch"
- patch -p1 -i "${srcdir}/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch"
- patch -p1 -i "${srcdir}/0007-set-default-cubietruck-led-triggers.patch"
- patch -p1 -i "${srcdir}/0008-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch"
- patch -p1 -i "${srcdir}/0009-disable-USB3-port-on-ODROID-XU.patch"
- patch -p1 -i "${srcdir}/0010-ARM-dove-enable-ethernet-on-D3Plug.patch"
+ patch -p1 -i "${srcdir}/0006-set-default-cubietruck-led-triggers.patch"
+ patch -p1 -i "${srcdir}/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch"
+ patch -p1 -i "${srcdir}/0008-disable-USB3-port-on-ODROID-XU.patch"
+ patch -p1 -i "${srcdir}/0009-ARM-dove-enable-ethernet-on-D3Plug.patch"
fi
# add freedo as boot logo
@@ -149,7 +147,7 @@ prepare() {
# http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
patch -p1 -i "${srcdir}/0002-fix-Atmel-maXTouch-touchscreen-support.patch"
- cat "${srcdir}/config.${CARCH}" > ./.config
+ cp -Tf ../config.${CARCH} .config
# append pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile
@@ -187,7 +185,6 @@ _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}")
conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
@@ -195,7 +192,7 @@ _package() {
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux.install
- cd "${srcdir}/${_srcname}"
+ cd ${_srcname}
# get kernel version
_kernver="$(make LOCALVERSION= kernelrelease)"
@@ -219,37 +216,39 @@ _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"
-
+ echo "${_kernver}" |
+ install -Dm644 /dev/stdin "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/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/"
+ 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
}
@@ -259,139 +258,76 @@ _package-headers() {
conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
-
- 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"
-
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
-
- 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
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- # copy files necessary for later builds
- cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
+ install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
+ install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
- # 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"
+ mkdir "${_builddir}/.tmp_versions"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
+ cp -t "${_builddir}" -a include scripts
- cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
+ install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
- 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"
+ cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
- # 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/"
+ install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
+ install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
- # 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/"
-
- # 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/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() {
@@ -400,15 +336,15 @@ _package-docs() {
conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- cd "${srcdir}/${_srcname}"
+ cd ${_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 {} \;
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+
+ mkdir -p "${_builddir}"
+ cp -t "${_builddir}" -a Documentation
- # remove a file already in kernel package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
}
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")