]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | include $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = grub | |
28 | PKG_VER = 0.97 | |
29 | PKG_REL = 0 | |
30 | ||
31 | PKG_MAINTAINER = | |
32 | PKG_GROUP = System/Boot | |
33 | PKG_URL = http://www.gnu.org/software/grub/ | |
34 | PKG_LICENSE = GPLv2+ | |
35 | PKG_SUMMARY = Grand Unified Boot Loader. | |
36 | ||
37 | PKG_BUILD_DEPS+= paxctl | |
38 | PKG_DEPS += ncurses | |
39 | ||
40 | define 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. | |
45 | endef | |
46 | ||
47 | PKG_TARBALL = $(THISAPP).tar.gz | |
48 | ||
49 | PKG_PATCHES += $(THISAPP)-disk_geometry-1.patch | |
50 | PKG_PATCHES += grub-0.95-graphics.patch | |
51 | PKG_PATCHES += grub-0.91-splashimagehelp.patch | |
52 | PKG_PATCHES += grub-0.93-graphics-bootterm.patch | |
53 | PKG_PATCHES += grub-0.95-xpmjunk.patch | |
54 | PKG_PATCHES += grub-0.95-splash-error-term.patch | |
55 | PKG_PATCHES += grub-0.93-special-device-names.patch | |
56 | PKG_PATCHES += grub-0.95-moreraid.patch | |
57 | PKG_PATCHES += grub-0.94-i2o.patch | |
58 | PKG_PATCHES += grub-0.93-configfile.patch | |
59 | PKG_PATCHES += $(THISAPP)-256byte_inode-1.patch | |
60 | PKG_PATCHES += $(THISAPP)-install.in.patch | |
61 | PKG_PATCHES += grub-0.94-installcopyonly.patch | |
62 | PKG_PATCHES += $(THISAPP)-ext4-1.patch | |
63 | ||
64 | define QUALITY_AGENT_WHITELIST_EXECSTACK | |
65 | /usr/sbin/grub | |
66 | endef | |
67 | ||
68 | CFLAGS += -fno-strict-aliasing -fno-stack-protector -fno-pic -fno-pie -nopie | |
69 | CXXFLAGS = | |
70 | ||
71 | ############################################################################### | |
72 | # Installation Details | |
73 | ############################################################################### | |
74 | ||
75 | define STAGE_PREPARE_CMDS | |
76 | cd $(DIR_APP) && autoconf | |
77 | endef | |
78 | ||
79 | define 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) | |
87 | endef | |
88 | ||
89 | define 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 | |
102 | endef |