]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - pkgs/core/grub/grub.nm
New package: grub.
[people/stevee/ipfire-3.x.git] / pkgs / core / grub / grub.nm
CommitLineData
c36e4789
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include $(PKGROOT)/Include
26
27PKG_NAME = grub
28PKG_VER = 0.97
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = System/Boot
33PKG_URL = http://www.gnu.org/software/grub/
34PKG_LICENSE = GPLv2+
35PKG_SUMMARY = Grand Unified Boot Loader.
36
37PKG_BUILD_DEPS+= paxctl
38PKG_DEPS += ncurses
39
40define PKG_DESCRIPTION
41 GRUB (Grand Unified Boot Loader) is an experimental boot loader \
42 capable of booting into most free operating systems - Linux, FreeBSD, \
43 NetBSD, GNU Mach, and others as well as most commercial operating \
44 systems.
45endef
46
47PKG_TARBALL = $(THISAPP).tar.gz
48
49PKG_PATCHES += $(THISAPP)-disk_geometry-1.patch
50PKG_PATCHES += grub-0.95-graphics.patch
51PKG_PATCHES += grub-0.91-splashimagehelp.patch
52PKG_PATCHES += grub-0.93-graphics-bootterm.patch
53PKG_PATCHES += grub-0.95-xpmjunk.patch
54PKG_PATCHES += grub-0.95-splash-error-term.patch
55PKG_PATCHES += grub-0.93-special-device-names.patch
56PKG_PATCHES += grub-0.95-moreraid.patch
57PKG_PATCHES += grub-0.94-i2o.patch
58PKG_PATCHES += grub-0.93-configfile.patch
59PKG_PATCHES += $(THISAPP)-256byte_inode-1.patch
60PKG_PATCHES += $(THISAPP)-install.in.patch
61PKG_PATCHES += grub-0.94-installcopyonly.patch
62PKG_PATCHES += $(THISAPP)-ext4-1.patch
63
64define QUALITY_AGENT_WHITELIST_EXECSTACK
65 /usr/sbin/grub
66endef
67
68CFLAGS += -fno-strict-aliasing -fno-stack-protector -fno-pic -fno-pie -nopie
69CXXFLAGS =
70
71###############################################################################
72# Installation Details
73###############################################################################
74
75define STAGE_PREPARE_CMDS
76 cd $(DIR_APP) && autoconf
77endef
78
79define STAGE_BUILD
80 cd $(DIR_APP) && \
81 grub_cv_prog_objcopy_absolute=yes \
82 ./configure \
83 $(CONFIGURE_ARCH) \
84 --prefix=/usr
85
86 cd $(DIR_APP) && make $(PARALLELISMFLAGS)
87endef
88
89define STAGE_INSTALL
90 cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT)
91
92 sed -e "s/pkgdatadir/pkglibdir/g" -i $(BUILDROOT)/usr/sbin/grub-install
93
94 mkdir -pv $(BUILDROOT)/boot/grub
95 for i in $(DIR_SOURCE)/{grub.conf,splash.xpm.gz}; do \
96 cp -vf $$i $(BUILDROOT)/boot/grub; \
97 done
98
99 # Grub uses anonymous mapping and will be killed by PaX.
100 # The following command changes Grub's PaX flags:
101 paxctl -spme $(BUILDROOT)/usr/sbin/grub
102endef