summaryrefslogtreecommitdiff
path: root/libre/linux-libre-lts/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre-lts/PKGBUILD')
-rw-r--r--libre/linux-libre-lts/PKGBUILD236
1 files changed, 108 insertions, 128 deletions
diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD
index 962684a6b..827007223 100644
--- a/libre/linux-libre-lts/PKGBUILD
+++ b/libre/linux-libre-lts/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 216399 2014-07-03 10:39:26Z bpiotrowski $
+# $Id: PKGBUILD 216755 2014-07-09 19:52:33Z andyrtr $
# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Maintainer (Arch): Thomas Baechler <thomas@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
@@ -6,14 +6,15 @@
# Contributor: Sorin-Mihai Vârgolici <smv@yobicore.org>
# Contributor: Michał Masłowski <mtjm@mtjm.eu>
# Contributor: Márcio Silva <coadde@parabola.nu>
+# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-pkgbase=linux-libre-lts # Build stock -LIBRE-LTS kernel
+pkgbase=linux-libre-lts # Build stock -libre-lts kernel
#pkgbase=linux-libre-custom # Build kernel with a different name
-_basekernel=3.10
-_sublevel=46
+_basekernel=3.14
+_sublevel=12
pkgver=${_basekernel}.${_sublevel}
pkgrel=1
-_lxopkgver=${_basekernel}.46 # nearly always the same as pkgver
+_lxopkgver=${_basekernel}.12 # nearly always the same as pkgver
arch=('i686' 'x86_64' 'mips64el')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
@@ -29,37 +30,43 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'Kbuild.platforms'
'boot-logo.patch'
'change-default-console-loglevel.patch'
- 'criu-no-expert.patch'
+ '0001-Bluetooth-allocate-static-minor-for-vhci.patch'
+ '0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch'
+ '0003-module-remove-MODULE_GENERIC_TABLE.patch'
+ '0006-genksyms-fix-typeof-handling.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.xz")
-md5sums=('d562fd52580a3b6b18b6eeb5921d1d5c'
- '539e8ef7b832df673722befd820757ea'
- 'c4c1ffeb312c2a70685fd960cc328e01'
- '16867e648e4b9f89bec949cb643888c2'
- 'c072b17032e80debc6a8626299245d46'
- '2967cecc3af9f954ccc822fd63dca6ff'
- '8267264d9a8966e57fdacd1fa1fc65c4'
- '04b21c79df0a952c22d681dd4f4562df'
- 'f3def2cefdcbb954c21d8505d23cc83c'
- 'd50c1ac47394e9aec637002ef3392bd1'
- '60083ec9e0d0f313a4e4af843d9e96ef')
+sha256sums=('477555c709b9407fe37dbd70d3331ff9dde1f9d874aba2741f138d07ae6f281b'
+ 'bdb59c597c883cc0f78cebccca5652e79b63f30e1d497e0560737ba66a48ae27'
+ '9e7dcc90121995024632476d50286b62dbb73da20a7970653a2d72a0a98406c0'
+ '35f283689c4f8b346bc05ac57c3cce50a61a1d0c11a665fc1abf519bb3f1beea'
+ 'f621efae2b2303f4d7bf992904c9ac88d64d1ed773f2d8e7f789389e0094f95a'
+ 'c5451d5e1eafc4f8d28b1a2958ec3102c124433a414a86450fc32058e004156b'
+ '55bf07738a3286168a7929ae16dbca29defd14e77b9d24c487ae4c3d12bb9eb9'
+ '5ae80ee1cbc0c894d9f5dd99d201999ea3b384fab9d047051b28dca12e355c47'
+ 'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182'
+ '6d72e14552df59e6310f16c176806c408355951724cd5b48a47bf01591b8be02'
+ '52dec83a8805a8642d74d764494acda863e0aa23e3d249e80d4b457e20a3fd29'
+ '65d58f63215ee3c5f9c4fc6bce36fc5311a6c7dbdbe1ad29de40647b47ff9c0d'
+ 'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7'
+ '300dda5d4f38da93b49f685eb5a8f67b878a49a81b85b64c8648d39950234c6f')
if [ "$CARCH" != "mips64el" ]; then
# don't use the Loongson-specific patches on non-mips64el arches.
unset source[${#source[@]}-1]
- unset md5sums[${#md5sums[@]}-1]
+ unset sha256sums[${#sha256sums[@]}-1]
fi
_kernelname=${pkgbase#linux-libre}
-_localversionname=-LIBRE-LTS
+_localversionname=-libre-lts
prepare() {
cd "${srcdir}/linux-${_basekernel}"
if [ "${_basekernel}" != "${pkgver}" ]; then
- patch -Np1 -i "${srcdir}/patch-${_basekernel}-gnu-${pkgver}-gnu"
+ patch -p1 -i "${srcdir}/patch-${_basekernel}-gnu-${pkgver}-gnu"
fi
# add freedo as boot logo
- patch -Np1 -i "${srcdir}/boot-logo.patch"
+ patch -p1 -i "${srcdir}/boot-logo.patch"
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
@@ -67,19 +74,26 @@ prepare() {
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
- patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
+ patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
- # allow criu without expert option set
- # patch from fedora
- patch -Np1 -i "${srcdir}/criu-no-expert.patch"
+ # Fix vhci warning in kmod (to restore every kernel maintainer's sanity)
+ patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch"
+
+ # Fix atkbd aliases
+ patch -p1 -i "${srcdir}/0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch"
+ patch -p1 -i "${srcdir}/0003-module-remove-MODULE_GENERIC_TABLE.patch"
+
+ # Fix generation of symbol CRCs
+ # http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18
+ patch -p1 -i "${srcdir}/0006-genksyms-fix-typeof-handling.patch"
if [ "$CARCH" == "mips64el" ]; then
sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-lts|" Makefile
sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \
< "${srcdir}/lxo-config.patch" > lxo-config.patch
msg2 "Adding loongson-community patches"
- patch -Np1 -i ${srcdir}/${_basekernel}*-*-loongson-community.patch
- patch -Np0 -i lxo-config.patch
+ patch -p1 -i ${srcdir}/${_basekernel}*-*-loongson-community.patch
+ patch -p0 -i lxo-config.patch
# ensure N32, add localversion, remove uevent helper as per
# https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README
@@ -105,10 +119,6 @@ prepare() {
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
-}
-
-build() {
- cd "${srcdir}/linux-${_basekernel}"
# get kernel version
make prepare
@@ -118,26 +128,16 @@ build() {
#make menuconfig # CLI menu for configuration
#make nconfig # new CLI menu for configuration
#make xconfig # X-based configuration
- make oldconfig # using old config from previous kernel version
+ #make oldconfig # using old config from previous kernel version
# ... or manually edit .config
# rewrite configuration
yes "" | make config >/dev/null
+}
- # save configuration for later reuse
- if [ "${CARCH}" = "x86_64" ]; then
- cat .config > "${startdir}/config.x86_64.last"
- else
- cat .config > "${startdir}/config.i686.last"
- fi
-
- ####################
- # stop here
- # this is useful to configure the kernel
- #msg "Stopping build"; return 1
- ####################
+build() {
+ cd "${srcdir}/linux-${_basekernel}"
- # build!
if [ "$CARCH" == "mips64el" ]; then
# The build system passes it directly to linker, disable to avoid
# having unknown -Wl,... options.
@@ -192,9 +192,6 @@ _package() {
cp arch/${KARCH}/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
fi
- # add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
-
# set correct depmod command for install
cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
true && install=${install}.pkg
@@ -225,16 +222,20 @@ _package() {
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
# make room for external modules
- ln -s "../extramodules-${_basekernel}${_localversionname:--LIBRE-LTS}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+ ln -s "../extramodules-${_basekernel}${_localversionname:--libre-lts}" "${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}${_localversionname:--LIBRE-LTS}"
- echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--LIBRE-LTS}/version"
+ mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--libre-lts}"
+ echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--libre-lts}/version"
# Now we call depmod...
- depmod -b "$pkgdir" -F System.map "$_kernver"
+ depmod -b "${pkgdir}" -F System.map "${_kernver}"
# move module tree /lib -> /usr/lib
- mv "$pkgdir/lib" "$pkgdir/usr"
+ mkdir -p "${pkgdir}/usr"
+ mv "${pkgdir}/lib" "${pkgdir}/usr/"
+
+ # add vmlinux
+ install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
}
_package-headers() {
@@ -254,130 +255,109 @@ _package-headers() {
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
- cd "${pkgdir}/usr/lib/modules/${_kernver}"
- ln -sf ../../../src/linux-${_kernver} build
-
cd "${srcdir}/linux-${_basekernel}"
install -D -m644 Makefile \
- "${pkgdir}/usr/src/linux-${_kernver}/Makefile"
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
install -D -m644 kernel/Makefile \
- "${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
install -D -m644 .config \
- "${pkgdir}/usr/src/linux-${_kernver}/.config"
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
+ 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 sound trace uapi video xen; do
- cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
+ cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
done
# copy arch includes for external modules
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}"
- cp -a arch/${KARCH}/include "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}"
+ cp -a arch/${KARCH}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
# copy files necessary for later builds
- cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
- cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
+ cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
+ cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
if [ "$CARCH" = "mips64el" ]; then
- cp arch/${KARCH}/Kbuild "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
- cp -a arch/${KARCH}/loongson "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
- cp ${srcdir}/Kbuild.platforms "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ cp arch/${KARCH}/Kbuild "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ cp -a arch/${KARCH}/loongson "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ cp ${srcdir}/Kbuild.platforms "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
fi
# fix permissions on scripts dir
- chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
+ chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
- cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
if [ "${CARCH}" = "i686" ]; then
- cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
fi
- cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
-
- # add headers for lirc package
- # pci
- for i in bt8xx cx88 saa7134; do
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
- cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
- done
- # usb
- for i in cpia2 em28xx pwc sn9c102; do
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
- cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
- done
- # i2c
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
- cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
- for i in cx25840; do
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
- cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
- done
+ 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/src/linux-${_kernver}/Documentation/DocBook/Makefile"
+ "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
# add dm headers
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
- cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
+ 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/src/linux-${_kernver}/include/linux"
- cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
+ 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/src/linux-${_kernver}/net/mac80211/"
- cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
+ 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/src/linux-${_kernver}/drivers/media/dvb-core"
- cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
+ 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/src/linux-${_kernver}/include/config/dvb/"
- cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
+ 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:
# http://bugs.archlinux.org/task/13146
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
- cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
- cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
+ 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/"
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
- cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
- cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
- cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
+ 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/"
# add xfs and shmem for aufs building
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
- cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
+ cp fs/xfs/xfs_sb.h "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs/xfs_sb.h"
# copy in Kconfig files
- for i in `find . -name "Kconfig*"`; do
- mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
- cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
+ 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
- chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
- find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
+ 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/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
+ 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}";;
@@ -389,11 +369,11 @@ _package-headers() {
done
# remove unneeded architectures
- rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
+ rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
if [ "$CARCH" = "mips64el" ]; then
- rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
+ rm -rf ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86
else
- rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/mips
+ rm -rf ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/mips
fi
}
@@ -405,13 +385,13 @@ _package-docs() {
cd "${srcdir}/linux-${_basekernel}"
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}"
- cp -al Documentation "${pkgdir}/usr/src/linux-${_kernver}"
+ 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 {} \;
# remove a file already in linux package
- rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
+ rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
}
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")