rebuild for /usr move

- run depmod only AFTER compressing modules
This commit is contained in:
Dave Reisner 2012-07-04 00:19:40 +00:00
parent e0c4cde30f
commit af0cf10f44
2 changed files with 14 additions and 5 deletions

View File

@ -8,7 +8,7 @@ pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -ARCH kernel
_kernelname=${pkgname#linux} _kernelname=${pkgname#linux}
_basekernel=3.4 _basekernel=3.4
pkgver=${_basekernel}.4 pkgver=${_basekernel}.4
pkgrel=2 pkgrel=3
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="http://www.kernel.org/" url="http://www.kernel.org/"
license=('GPL2') license=('GPL2')
@ -79,6 +79,9 @@ build() {
# set extraversion to pkgrel # set extraversion to pkgrel
sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
# get kernel version # get kernel version
make prepare make prepare
@ -153,6 +156,12 @@ package_linux() {
# add real version for building modules and running depmod from post_install/upgrade # add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}" mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version" echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
# move module tree /lib -> /usr/lib
mv "$pkgdir/lib" "$pkgdir/usr"
# Now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver"
} }
package_linux-headers() { package_linux-headers() {
@ -161,10 +170,10 @@ package_linux-headers() {
conflicts=('kernel26-headers') conflicts=('kernel26-headers')
replaces=('kernel26-headers') replaces=('kernel26-headers')
mkdir -p "${pkgdir}/lib/modules/${_kernver}" install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
cd "${pkgdir}/lib/modules/${_kernver}" cd "${pkgdir}/usr/lib/modules/${_kernver}"
ln -sf ../../../usr/src/linux-${_kernver} build ln -sf ../../../src/linux-${_kernver} build
cd "${srcdir}/linux-${_basekernel}" cd "${srcdir}/linux-${_basekernel}"
install -D -m644 Makefile \ install -D -m644 Makefile \

View File

@ -2,7 +2,7 @@
# arg 2: the old package version # arg 2: the old package version
KERNEL_NAME= KERNEL_NAME=
KERNEL_VERSION=3.4.4-2-ARCH KERNEL_VERSION=3.4.4-3-ARCH
# set a sane PATH to ensure that critical utils like depmod will be found # set a sane PATH to ensure that critical utils like depmod will be found
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'