rebuild for /usr move
- run depmod only AFTER compressing modules
This commit is contained in:
parent
e0c4cde30f
commit
af0cf10f44
17
PKGBUILD
17
PKGBUILD
|
@ -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 \
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue