2005-11-28 01:27:22 +01:00
|
|
|
# $NetBSD: Makefile,v 1.7 2005/11/28 00:27:26 rillig Exp $
|
2004-01-27 18:51:08 +01:00
|
|
|
|
2004-01-28 11:06:33 +01:00
|
|
|
.include "Makefile.common"
|
2004-01-27 18:51:08 +01:00
|
|
|
|
2004-06-13 00:44:24 +02:00
|
|
|
# The naming scheme allows it to be installed multiple times simultaneously
|
|
|
|
PKGNAME= linux-kernel${LINUX_VERSION}-${LINUX_VERSION}
|
2004-01-28 11:06:33 +01:00
|
|
|
COMMENT= The Linux kernel
|
2004-01-27 18:51:08 +01:00
|
|
|
|
2004-03-07 03:29:19 +01:00
|
|
|
BUILD_DEPENDS+= linux-module-init-tools-[0-9]*:../../wip/linux-module-init-tools
|
|
|
|
# This means that old linux-modutils aren't available for other kernel
|
|
|
|
#BUILD_DEPENDS+= linux-modutils-[0-9]*:../../wip/linux-modutils
|
2004-01-27 18:51:08 +01:00
|
|
|
|
2004-06-13 00:44:24 +02:00
|
|
|
# Don't let the Linux kernel get accidently deinstalled.
|
|
|
|
# XXX todo: fix pkg_info to not be so noisy about this
|
|
|
|
# XXX maybe say "Package preserve option is set" or ...?
|
|
|
|
PKG_PRESERVE= # defined
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
# Location of where boot/ and lib/modules directories are located.
|
|
|
|
# XXX do not use this yet
|
|
|
|
LINUXBASE?= ${PREFIX}
|
|
|
|
# XXX can not set LOCALBASE because
|
|
|
|
# PREFIX is used in patch for depmod
|
|
|
|
# PKG_TOOLS_BIN is changed
|
|
|
|
#LOCALBASE= /
|
|
|
|
|
|
|
|
NO_MTREE= YES
|
|
|
|
|
2005-11-28 01:27:22 +01:00
|
|
|
PLIST_SUBST+= LINUXBASE=${LINUXBASE:Q}
|
2004-06-13 00:44:24 +02:00
|
|
|
MESSAGE_SUBST+= PKGBASE=${PKGBASE}
|
|
|
|
|
|
|
|
MAKE_DIRS+= ${LINUXBASE}/lib/modules
|
|
|
|
MAKE_DIRS+= ${LINUXBASE}/boot
|
|
|
|
|
2004-01-27 18:51:08 +01:00
|
|
|
do-build:
|
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} bzImage && \
|
|
|
|
${SETENV} ${MAKE_ENV} ${GMAKE} modules
|
|
|
|
|
|
|
|
do-install:
|
2004-06-13 00:44:24 +02:00
|
|
|
${INSTALL_DATA_DIR} ${LINUXBASE}/boot
|
2004-01-28 11:06:33 +01:00
|
|
|
${CP} ${WRKSRC}/arch/${LOWER_ARCH}/boot/bzImage \
|
2004-06-13 00:44:24 +02:00
|
|
|
${LINUXBASE}/boot/bzImage-${LINUX_VERSION}
|
2004-01-28 11:06:33 +01:00
|
|
|
${CP} ${WRKSRC}/System.map \
|
2004-06-13 00:44:24 +02:00
|
|
|
${LINUXBASE}/boot/System.map-${LINUX_VERSION}
|
2004-03-07 03:29:19 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/.config ${PREFIX}/boot/${PKGNAME}.config
|
2004-01-27 18:51:08 +01:00
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} modules_install
|
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|