kernel-snapshot: switch to /usr.
This commit is contained in:
parent
1360624945
commit
9526523450
|
@ -8,6 +8,6 @@ long_desc="
|
|||
external 3rd party binary modules."
|
||||
|
||||
do_install() {
|
||||
vmove usr
|
||||
vmove lib/modules/${_kernver}/build lib/modules/${_kernver}
|
||||
vmove usr/src usr
|
||||
vmove usr/lib/modules/${_kernver}/build usr/lib/modules/${_kernver}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ _kpatch=rc6
|
|||
|
||||
pkgname=kernel-snapshot
|
||||
version=${_kmajor}.${_kminor}${_kpatch}
|
||||
revision=3
|
||||
revision=7
|
||||
wrksrc="linux-${_kmajor}-${_kpatch}"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://www.kernel.org"
|
||||
|
@ -30,13 +30,13 @@ kernel_hooks_version="${_kernver}"
|
|||
|
||||
# These files could be modified when an external module is built.
|
||||
mutable_files="
|
||||
/lib/modules/${_kernver}/modules.dep
|
||||
/lib/modules/${_kernver}/modules.dep.bin
|
||||
/lib/modules/${_kernver}/modules.symbols
|
||||
/lib/modules/${_kernver}/modules.symbols.bin
|
||||
/lib/modules/${_kernver}/modules.alias
|
||||
/lib/modules/${_kernver}/modules.alias.bin
|
||||
/lib/modules/${_kernver}/modules.devname"
|
||||
/usr/lib/modules/${_kernver}/modules.dep
|
||||
/usr/lib/modules/${_kernver}/modules.dep.bin
|
||||
/usr/lib/modules/${_kernver}/modules.symbols
|
||||
/usr/lib/modules/${_kernver}/modules.symbols.bin
|
||||
/usr/lib/modules/${_kernver}/modules.alias
|
||||
/usr/lib/modules/${_kernver}/modules.alias.bin
|
||||
/usr/lib/modules/${_kernver}/modules.devname"
|
||||
|
||||
do_configure() {
|
||||
# If there's a file called <arch>-dotconfig, use it to
|
||||
|
@ -76,6 +76,9 @@ do_install() {
|
|||
arch=x86_64
|
||||
fi
|
||||
|
||||
# Run depmod after compressing modules.
|
||||
sed -i '2iexit 0' scripts/depmod.sh
|
||||
|
||||
# Install kernel, firmware and modules
|
||||
make INSTALL_MOD_PATH=${DESTDIR} modules_install
|
||||
|
||||
|
@ -86,9 +89,14 @@ do_install() {
|
|||
${DESTDIR}/boot/vmlinuz-${_kernver}
|
||||
install -Dm644 System.map \
|
||||
${DESTDIR}/boot/System.map-${_kernver}
|
||||
cd ${DESTDIR}/lib/modules/${_kernver} && \
|
||||
|
||||
# Switch to /usr.
|
||||
vmkdir usr
|
||||
vmove lib usr
|
||||
|
||||
cd ${DESTDIR}/usr/lib/modules/${_kernver} && \
|
||||
rm -f source build && \
|
||||
ln -sf ../../../usr/src/kernel-headers-${_kernver} build
|
||||
ln -sf ../../../src/kernel-headers-${_kernver} build
|
||||
|
||||
cd ${wrksrc}
|
||||
# Install required headers to build external modules
|
||||
|
@ -97,7 +105,7 @@ do_install() {
|
|||
install -Dm644 .config ${hdrdest}/.config
|
||||
mkdir -p ${hdrdest}/include
|
||||
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
||||
rm -rf ${DESTDIR}/lib/firmware
|
||||
rm -rf ${DESTDIR}/usr/lib/firmware
|
||||
|
||||
for i in acpi asm-generic config generated linux math-emu media net \
|
||||
pcmcia scsi sound trace video; do
|
||||
|
@ -210,6 +218,7 @@ do_install() {
|
|||
# Compress all modules with xz to save a few MBs.
|
||||
msg_normal "$pkgver: compressing kernel modules with xz, please wait...\n"
|
||||
find ${DESTDIR} -name '*.ko' -exec xz -9 {} \;
|
||||
|
||||
# ... and run depmod again.
|
||||
depmod -b ${DESTDIR} ${_kernver}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue