kernel: generated version is X.Y.Z, use this to simplify.
This commit is contained in:
parent
36e5bf1bf4
commit
fd72d01642
|
@ -1,13 +1,10 @@
|
|||
# Common vars shared by the 'kernel' and 'kernel-libc-headers'
|
||||
# build templates.
|
||||
version=3.0
|
||||
_kernel_ver_minor=0
|
||||
wrksrc="linux-$version"
|
||||
distfiles="${KERNEL_SITE}/kernel/v3.0/linux-${version}.tar.bz2"
|
||||
_kmajorver=3.0
|
||||
version=${_kmajorver}.0
|
||||
wrksrc="linux-${_kmajorver}"
|
||||
distfiles="${KERNEL_SITE}/kernel/v3.0/linux-${_kmajorver}.tar.bz2"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://www.kernel.org"
|
||||
license="GPL-2"
|
||||
checksum=64b0228b54ce39b0b2df086109a7b737cde58e3df4f779506ddcaccee90356a0
|
||||
|
||||
# Generated kernel version is not the same than in distfile!
|
||||
_kernel_hooks_version="${version}.${_kernel_ver_minor}"
|
||||
|
|
|
@ -8,18 +8,18 @@ long_desc="
|
|||
This package provides the linux kernel image and associated modules."
|
||||
subpackages="kernel-headers"
|
||||
triggers="kernel-hooks"
|
||||
|
||||
nostrip=yes
|
||||
noverifyrdeps=yes
|
||||
preserve=yes
|
||||
|
||||
revision=1
|
||||
_kernel_headers_revision=${revision}
|
||||
if [ -n "${_kernel_ver_minor}" ]; then
|
||||
_kernver="${version}.${_kernel_ver_minor}"
|
||||
if [ -n "${_kernel_snapshot}" ]; then
|
||||
_kernver="${_kernel_ver}.${_kernel_ver_minor}-${_kernel_patch_ver}"
|
||||
else
|
||||
_kernver="${version}"
|
||||
fi
|
||||
if [ -n "${_kernel_patch_ver}" ]; then
|
||||
_kernver="${_kernver}-${_kernel_patch_ver}"
|
||||
fi
|
||||
if [ -n "${revision}" ]; then
|
||||
_kernver="${_kernver}_${revision}"
|
||||
fi
|
||||
|
@ -67,7 +67,7 @@ do_build()
|
|||
|
||||
do_install()
|
||||
{
|
||||
local arch lver hdrdest
|
||||
local arch hdrdest
|
||||
|
||||
if [ "$xbps_machine" != "x86_64" ]; then
|
||||
arch=i386
|
||||
|
@ -78,28 +78,22 @@ do_install()
|
|||
# Install kernel, firmware and modules
|
||||
make INSTALL_MOD_PATH=${DESTDIR} modules_install
|
||||
|
||||
if [ -n "${_kernel_snapshot}" ]; then
|
||||
lver="${_kernver}-${_kernel_patch_ver}"
|
||||
else
|
||||
lver="${_kernver}"
|
||||
fi
|
||||
hdrdest=${DESTDIR}/usr/src/kernel-headers-${_kernver}
|
||||
|
||||
hdrdest=${DESTDIR}/usr/src/kernel-headers-${lver}
|
||||
|
||||
install -D -m 644 .config ${DESTDIR}/boot/config-${lver}
|
||||
install -D -m 644 arch/x86/boot/bzImage \
|
||||
${DESTDIR}/boot/vmlinuz-${lver}
|
||||
install -D -m 644 System.map \
|
||||
${DESTDIR}/boot/System.map-${lver}
|
||||
cd ${DESTDIR}/lib/modules/${lver} && \
|
||||
install -Dm644 .config ${DESTDIR}/boot/config-${_kernver}
|
||||
install -Dm644 arch/x86/boot/bzImage \
|
||||
${DESTDIR}/boot/vmlinuz-${_kernver}
|
||||
install -Dm644 System.map \
|
||||
${DESTDIR}/boot/System.map-${_kernver}
|
||||
cd ${DESTDIR}/lib/modules/${_kernver} && \
|
||||
rm -f source build && \
|
||||
ln -sf ../../../usr/src/kernel-headers-${lver} build
|
||||
ln -sf ../../../usr/src/kernel-headers-${_kernver} build
|
||||
|
||||
cd ${wrksrc}
|
||||
# Install required headers to build external modules
|
||||
install -D -m644 Makefile ${hdrdest}/Makefile
|
||||
install -D -m644 kernel/Makefile ${hdrdest}/kernel/Makefile
|
||||
install -D -m644 .config ${hdrdest}/.config
|
||||
install -Dm644 Makefile ${hdrdest}/Makefile
|
||||
install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
|
||||
install -Dm644 .config ${hdrdest}/.config
|
||||
mkdir -p ${hdrdest}/include
|
||||
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
||||
rm -rf ${DESTDIR}/lib/firmware
|
||||
|
|
Loading…
Reference in New Issue