2009-12-29 17:15:50 +01:00
|
|
|
# $NetBSD: Makefile,v 1.6 2009/12/29 16:15:50 gregoire Exp $
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
DISTNAME= grub-bazaar-snapshot
|
|
|
|
PKGNAME= grub2-${TODAY}
|
|
|
|
CATEGORIES= sysutils
|
|
|
|
|
|
|
|
MAINTAINER= gregoire.sutre@labri.fr
|
|
|
|
HOMEPAGE= http://www.gnu.org/software/grub/grub-2.en.html
|
|
|
|
COMMENT= GRand Unified Bootloader, version 2 (development snapshot)
|
|
|
|
LICENSE= gnu-gpl-v3
|
|
|
|
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
|
2009-12-27 01:14:01 +01:00
|
|
|
# Helper file for access to the bazaar repository and for autogen.sh.
|
|
|
|
.include "bzr.mk"
|
|
|
|
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
#
|
|
|
|
# XXX: Linux-*-powerpc and others?
|
|
|
|
#
|
|
|
|
ONLY_FOR_PLATFORM= *-*-i386 *-*-x86_64
|
|
|
|
|
|
|
|
PKG_SYSCONFSUBDIR= ${PKGBASE}
|
|
|
|
|
2009-12-22 09:29:18 +01:00
|
|
|
USE_TOOLS+= autoconf automake gettext-m4
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
USE_TOOLS+= gmake bison makeinfo
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
|
|
|
|
CONFIGURE_ARGS+= --program-transform-name=s,grub,grub2,
|
|
|
|
CONFIGURE_ARGS+= --enable-grub-fstest
|
|
|
|
CONFIGURE_ARGS+= --disable-efiemu
|
|
|
|
CONFIGURE_ARGS+= --disable-grub-emu-usb
|
|
|
|
CONFIGURE_ARGS+= --disable-grub-emu-pci
|
|
|
|
INFO_FILES= yes
|
|
|
|
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
|
|
|
|
|
|
# The modified Makefile installs all configuration scripts in ${EGDIR}.
|
|
|
|
MAKE_ENV+= EGDIR=${EGDIR}
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2009-12-29 17:15:50 +01:00
|
|
|
EGFILES= 00_header 30_os-prober 40_custom
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
.if ${OPSYS} == "FreeBSD"
|
|
|
|
EGFILES+= 10_kfreebsd
|
|
|
|
.elif ${OPSYS} == "Linux"
|
|
|
|
EGFILES+= 10_linux
|
|
|
|
.endif
|
|
|
|
.for file in ${EGFILES}
|
2009-12-29 17:15:50 +01:00
|
|
|
CONF_FILES_PERMS+= ${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file} ${ROOT_USER} ${ROOT_GROUP} 0755
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
.endfor
|
2009-12-29 17:15:50 +01:00
|
|
|
CONF_FILES+= ${EGDIR}/README ${PKG_SYSCONFDIR}/README
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
|
|
|
|
TODAY!= ${DATE} -u +'%Y%m%d'
|
|
|
|
|
|
|
|
# GRUB 2 current development trunk seems to prefer a recent version of gcc.
|
|
|
|
GCC_REQD= 4.3
|
|
|
|
|
|
|
|
#
|
|
|
|
# GRUB 2's configure script sets the variables `target_cpu' and `platform',
|
|
|
|
# which are used to define the location of library directory. We must take
|
|
|
|
# this into account for PLIST. The following mimics the behavior of the
|
|
|
|
# configure script. Our job is simpler as we only accept i386 and x86_64
|
|
|
|
# (see definition of ONLY_FOR_PLATFORM above).
|
|
|
|
#
|
|
|
|
GRUB_TARGET_CPU= ${MACHINE_ARCH}
|
|
|
|
.if ${LOWER_VENDOR} == "apple"
|
|
|
|
GRUB_PLATFORM= efi
|
|
|
|
.else
|
|
|
|
GRUB_PLATFORM= pc
|
|
|
|
.endif
|
|
|
|
.if ${GRUB_TARGET_CPU} == "x86_64" && ${GRUB_PLATFORM} == "pc"
|
|
|
|
GRUB_TARGET_CPU= i386
|
|
|
|
.endif
|
|
|
|
PLIST_SUBST+= GRUB_TARGET_CPU=${GRUB_TARGET_CPU}
|
|
|
|
PLIST_SUBST+= GRUB_PLATFORM=${GRUB_PLATFORM}
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following substitutions adjust the configuration and library paths:
|
|
|
|
# - $sysconfdir/grub.d is replaced by $sysconfdir in scripts, and by $EGDIR
|
|
|
|
# in Makefile.in.
|
|
|
|
# - $sysconfdir/default/grub is replaced by $sysconfdir/default.conf in
|
|
|
|
# scripts.
|
|
|
|
# - $libdir/grub is replaced by $libdir/grub2 in Makefile.in and in scripts.
|
|
|
|
#
|
|
|
|
SUBST_CLASSES+= fix-paths-1 fix-paths-2
|
|
|
|
SUBST_STAGE.fix-paths-1= pre-configure
|
|
|
|
SUBST_MESSAGE.fix-paths-1= Fixing configuration and library paths in makefile.
|
|
|
|
SUBST_FILES.fix-paths-1= Makefile.in
|
|
|
|
SUBST_SED.fix-paths-1= -e 's,\$$(sysconfdir)/grub.d,\$$(EGDIR),g'
|
|
|
|
SUBST_SED.fix-paths-1+= -e 's,\$$(libdir)/grub,\$$(libdir)/grub2,g'
|
|
|
|
SUBST_STAGE.fix-paths-2= pre-configure
|
|
|
|
SUBST_MESSAGE.fix-paths-2= Fixing configuration and library paths in scripts.
|
|
|
|
SUBST_FILES.fix-paths-2= util/grub-mkconfig.in util/update-grub_lib.in
|
|
|
|
SUBST_FILES.fix-paths-2+= util/grub.d/[0-3]*
|
|
|
|
SUBST_FILES.fix-paths-2+= util/grub-install.in
|
|
|
|
SUBST_SED.fix-paths-2= -e 's,\$${sysconfdir}/grub.d,\$${sysconfdir},g'
|
|
|
|
SUBST_SED.fix-paths-2+= -e 's,\$${sysconfdir}/default/grub,\$${sysconfdir}/default.conf,g'
|
|
|
|
SUBST_SED.fix-paths-2+= -e 's,\$${libdir}/grub,\$${libdir}/grub2,g'
|
|
|
|
|
|
|
|
# This package uses help2man to generate man pages.
|
|
|
|
BUILD_DEPENDS+= help2man>=1.36:../../converters/help2man
|
|
|
|
|
2009-12-22 15:59:42 +01:00
|
|
|
# Since revision 1974 (2009-12-22) of the bazaar trunk, the real GNU sed is
|
|
|
|
# required as the option `-i' of GNU sed is used (in file genmk.rb).
|
|
|
|
USE_TOOLS+= gsed
|
2009-12-28 13:08:54 +01:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
2009-12-22 15:59:42 +01:00
|
|
|
TOOLS_PLATFORM.gsed= # empty (to trick pkgsrc into the real gsed)
|
2009-12-28 13:08:54 +01:00
|
|
|
.endif
|
2009-12-22 15:59:42 +01:00
|
|
|
|
Import grub2-20091221 as wip/grub2-current.
This is the second version of the GRand Unified Bootloader, rewritten
from scratch to make GNU GRUB cleaner, safer, more robust, more powerful,
and more portable.
GRUB 2 currently runs on i386 and macppc, and groks many filesystems
(e.g. ext2, fat, ufs, minix, iso9660, jfs, hfs). It is able to load and
boot Multiboot (1 and 2) and Linux (bzImage and zImage) kernels and
chainload foreign operating systems' bootsectors.
This package is based on the current bazaar development snapshot.
2009-12-21 18:41:00 +01:00
|
|
|
.include "options.mk"
|
|
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|