void-packages/srcpkgs/kernel-uml/template

43 lines
1.2 KiB
Plaintext
Raw Normal View History

# Build template for 'kernel-uml'
pkgname=kernel-uml
2014-02-20 14:46:15 +01:00
version=3.10.30
revision=1
2012-02-21 17:29:58 +01:00
wrksrc=linux-${version}
2014-02-20 14:46:15 +01:00
hostmakedepends="perl bc"
makedepends="libpcap-devel uml-utilities"
depends="uml-utilities"
2012-02-21 17:29:58 +01:00
homepage="http://www.kernel.org"
license="GPL-2"
short_desc="Kernel ${version} for User Mode Linux"
2012-02-21 17:29:58 +01:00
distfiles="http://www.kernel.org/pub/linux/kernel/v3.x/linux-${version}.tar.xz"
2014-02-20 14:46:15 +01:00
checksum=150a05c96f9f00337d9bf14de0dfff4efe395c9b7776c189f1fb1901de113d29
2014-02-20 14:46:15 +01:00
case "$XBPS_TARGET_MACHINE" in
i686*) _subarch="x86";;
x86_64*) _subarch="x86_64";;
*) msg_error "${pkgname}-${version} cannot be built for ${XBPS_TARGET_MACHINE}.\n";;
esac
do_configure() {
if [ "$CROSS_BUILD" ]; then
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
make ${_args} ARCH=um SUBARCH=${_subarch} defconfig
}
2012-02-21 17:29:58 +01:00
do_build() {
2014-02-20 14:46:15 +01:00
unset LDFLAGS
if [ "$CROSS_BUILD" ]; then
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
make ${_args} ARCH=um SUBARCH=${_subarch} ${makejobs}
}
2012-02-21 17:29:58 +01:00
do_install() {
vinstall linux 755 usr/bin
make ARCH=um INSTALL_MOD_PATH=${DESTDIR}/usr/lib/uml modules_install
rm -f ${DESTDIR}/usr/lib/uml/lib/modules/${version}/{build,source}
mv ${DESTDIR}/usr/lib/uml/lib/modules ${DESTDIR}/usr/lib/uml
rmdir ${DESTDIR}/usr/lib/uml/lib
}