2010-05-24 19:19:07 +02:00
|
|
|
# $NetBSD: Makefile,v 1.20 2010/05/24 17:19:07 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
|
|
|
|
|
2010-01-17 11:55:53 +01:00
|
|
|
MAINTAINER= gregoire.sutre@gmail.com
|
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
|
|
|
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
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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"
|
|
|
|
|
2010-01-06 13:24:37 +01:00
|
|
|
EGFILES= 00_header 05_pkgsrc_theme 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
|
2010-01-06 01:11:20 +01:00
|
|
|
.elif ${OPSYS} == "NetBSD"
|
|
|
|
EGFILES+= 10_netbsd
|
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
|
|
|
.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
|
2010-01-06 00:45:40 +01:00
|
|
|
CONF_FILES+= ${EGDIR}/default.conf.sample ${PKG_SYSCONFDIR}/default.conf
|
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'
|
|
|
|
|
2010-05-20 01:39:47 +02:00
|
|
|
# GRUB 2 current development trunk requires a recent version of gcc.
|
|
|
|
GCC_REQD= 4.3
|
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
|
|
|
|
|
|
|
#
|
|
|
|
# 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}
|
|
|
|
|
|
|
|
#
|
2010-05-21 21:14:39 +02:00
|
|
|
# The following substitutions adjust the configuration paths:
|
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
|
|
|
# - $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.
|
2010-05-21 21:14:39 +02:00
|
|
|
# - DEFAULT_DIRECTORY is adjusted in include/grub/emu/misc.h.
|
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
|
|
|
#
|
2009-12-30 14:25:24 +01:00
|
|
|
SUBST_CLASSES+= fix-paths-1 fix-paths-2 fix-paths-3
|
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
|
|
|
SUBST_STAGE.fix-paths-1= pre-configure
|
2010-05-21 21:14:39 +02:00
|
|
|
SUBST_MESSAGE.fix-paths-1= Fixing configuration paths in makefile.
|
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
|
|
|
SUBST_FILES.fix-paths-1= Makefile.in
|
|
|
|
SUBST_SED.fix-paths-1= -e 's,\$$(sysconfdir)/grub.d,\$$(EGDIR),g'
|
|
|
|
SUBST_STAGE.fix-paths-2= pre-configure
|
2010-05-21 21:14:39 +02:00
|
|
|
SUBST_MESSAGE.fix-paths-2= Fixing configuration paths in util/grub-mkconfig.in.
|
|
|
|
SUBST_FILES.fix-paths-2= util/grub-mkconfig.in
|
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
|
|
|
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'
|
2009-12-30 14:06:16 +01:00
|
|
|
SUBST_STAGE.fix-paths-3= pre-configure
|
2010-05-21 21:14:39 +02:00
|
|
|
SUBST_MESSAGE.fix-paths-3= Fixing default directory in include/grub/emu/misc.h.
|
|
|
|
SUBST_FILES.fix-paths-3= include/grub/emu/misc.h
|
2009-12-30 14:06:16 +01:00
|
|
|
SUBST_SED.fix-paths-3= -e 's,"/grub","/grub2",g'
|
|
|
|
SUBST_SED.fix-paths-3+= -e 's,"/boot/grub","/boot/grub2",g'
|
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
|
|
|
|
|
|
|
# This package uses help2man to generate man pages.
|
|
|
|
BUILD_DEPENDS+= help2man>=1.36:../../converters/help2man
|
|
|
|
|
2010-05-19 15:07:49 +02:00
|
|
|
# A recent version of flex is required to build.
|
|
|
|
BUILD_DEPENDS+= flex>=2.5.35:../../devel/flex
|
|
|
|
|
2010-01-06 00:45:40 +01:00
|
|
|
post-install:
|
2010-05-21 23:58:17 +02:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/default.conf ${DESTDIR}${EGDIR}/default.conf.sample
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/05_pkgsrc_theme ${DESTDIR}${EGDIR}/05_pkgsrc_theme
|
2010-01-06 00:45:40 +01:00
|
|
|
|
2010-05-24 19:19:07 +02:00
|
|
|
# Options for this package
|
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"
|
2010-05-24 19:19:07 +02:00
|
|
|
|
|
|
|
# Helper file to access the bazaar repository, download translations and font
|
|
|
|
# files, and generate the configure script with autogen.sh.
|
|
|
|
.include "download.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
|
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|