2013-03-31 08:10:40 +00:00
|
|
|
# Build template for 'kernel-uml'
|
2011-02-09 11:35:53 +00:00
|
|
|
pkgname=kernel-uml
|
2014-02-20 13:46:15 +00:00
|
|
|
version=3.10.30
|
2013-04-12 15:12:12 +00:00
|
|
|
revision=1
|
2012-02-21 16:29:58 +00:00
|
|
|
wrksrc=linux-${version}
|
2014-02-20 13:46:15 +00:00
|
|
|
hostmakedepends="perl bc"
|
|
|
|
makedepends="libpcap-devel uml-utilities"
|
2014-01-01 15:10:11 +00:00
|
|
|
depends="uml-utilities"
|
2012-02-21 16:29:58 +00:00
|
|
|
homepage="http://www.kernel.org"
|
2013-03-31 08:10:40 +00:00
|
|
|
license="GPL-2"
|
2013-04-12 15:12:12 +00:00
|
|
|
short_desc="Kernel ${version} for User Mode Linux"
|
2012-02-21 16:29:58 +00:00
|
|
|
distfiles="http://www.kernel.org/pub/linux/kernel/v3.x/linux-${version}.tar.xz"
|
2014-02-20 13:46:15 +00:00
|
|
|
checksum=150a05c96f9f00337d9bf14de0dfff4efe395c9b7776c189f1fb1901de113d29
|
2011-02-09 11:35:53 +00:00
|
|
|
|
2014-02-20 13:46:15 +00: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
|
|
|
|
}
|
2011-02-09 11:35:53 +00:00
|
|
|
|
2012-02-21 16:29:58 +00:00
|
|
|
do_build() {
|
2014-02-20 13:46:15 +00:00
|
|
|
unset LDFLAGS
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
|
|
|
fi
|
|
|
|
make ${_args} ARCH=um SUBARCH=${_subarch} ${makejobs}
|
2011-02-09 11:35:53 +00:00
|
|
|
}
|
|
|
|
|
2012-02-21 16:29:58 +00:00
|
|
|
do_install() {
|
|
|
|
vinstall linux 755 usr/bin
|
2011-02-09 11:35:53 +00:00
|
|
|
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
|
|
|
|
}
|