]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
23f44cae | 4 | # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
0e61af85 | 27 | PKG_NAME = grub |
8985a698 MT |
28 | PKG_VER = 0.97 |
29 | PKG_REL = 0 | |
cd1a2927 | 30 | |
8985a698 | 31 | THISAPP = $(PKG_NAME)-$(PKG_VER) |
2beafa06 | 32 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 | 33 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
0e61af85 | 34 | |
6679675b | 35 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
0e61af85 | 36 | |
23f44cae MT |
37 | MAINTAINER = |
38 | GROUP = System/Boot | |
39 | EXTRA = no | |
40 | DEBUG = no | |
41 | DEPS = | |
42 | ||
43 | URL = http://www.gnu.org/software/grub/ | |
44 | LICENSE = GPLv2+ | |
45 | SHORT_DESC = Grand Unified Boot Loader. | |
46 | ||
47 | define LONG_DESC | |
7393a09f MT |
48 | GRUB (Grand Unified Boot Loader) is an experimental boot loader \ |
49 | capable of booting into most free operating systems - Linux, FreeBSD, \ | |
50 | NetBSD, GNU Mach, and others as well as most commercial operating \ | |
23f44cae MT |
51 | systems. |
52 | endef | |
53 | ||
cd1a2927 MT |
54 | CFLAGS = |
55 | CXXFLAGS = | |
56 | ||
57 | ############################################################################### | |
58 | # Top-level Rules | |
59 | ############################################################################### | |
60 | ||
23f44cae MT |
61 | objects = $(DL_FILE) \ |
62 | grub-0.94-i2o.patch \ | |
63 | grub-0.95-moreraid.patch \ | |
64 | grub-0.93-special-device-names.patch \ | |
65 | grub-0.95-splash-error-term.patch \ | |
66 | grub-0.95-xpmjunk.patch \ | |
67 | grub-0.93-graphics-bootterm.patch \ | |
68 | grub-0.91-splashimagehelp.patch \ | |
69 | grub-0.95-graphics.patch \ | |
70 | $(THISAPP)-disk_geometry-1.patch \ | |
71 | grub-0.93-configfile.patch \ | |
72 | $(THISAPP)-256byte_inode-1.patch \ | |
73 | grub-0.94-installcopyonly.patch \ | |
a907b770 | 74 | $(THISAPP)-install.in.patch |
cd1a2927 | 75 | |
23f44cae MT |
76 | download: $(objects) |
77 | ||
78 | info: | |
79 | $(DO_PKG_INFO) | |
80 | ||
81 | install: $(OBJECT) | |
cd1a2927 | 82 | |
23f44cae MT |
83 | package: |
84 | @$(DO_PACKAGE) | |
cd1a2927 | 85 | |
23f44cae | 86 | $(objects): |
cd1a2927 MT |
87 | @$(LOAD) |
88 | ||
cd1a2927 MT |
89 | ############################################################################### |
90 | # Installation Details | |
91 | ############################################################################### | |
92 | ||
23f44cae | 93 | $(OBJECT): $(objects) |
cd1a2927 | 94 | @$(PREBUILD) |
23f44cae | 95 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
86ad4015 MT |
96 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-disk_geometry-1.patch |
97 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-graphics.patch | |
98 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.91-splashimagehelp.patch | |
99 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-graphics-bootterm.patch | |
100 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-xpmjunk.patch | |
101 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-splash-error-term.patch | |
102 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-special-device-names.patch | |
103 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-moreraid.patch | |
104 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-i2o.patch | |
105 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-configfile.patch | |
005baab4 | 106 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-256byte_inode-1.patch |
a907b770 MT |
107 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-install.in.patch |
108 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-installcopyonly.patch | |
bfe2b108 | 109 | |
a907b770 | 110 | cd $(DIR_APP) && autoconf |
bfe2b108 | 111 | |
ed5ee760 MT |
112 | cd $(DIR_APP) && \ |
113 | CC="gcc -fno-stack-protector -fno-pic -fno-pie -nopie" \ | |
5701f43c MT |
114 | ./configure \ |
115 | $(CONFIGURE_ARCH) \ | |
116 | --prefix=/usr | |
0e61af85 MT |
117 | |
118 | cd $(DIR_APP) && make -j $(PRALLELISM) | |
cd1a2927 | 119 | cd $(DIR_APP) && make install |
f40f21dd MT |
120 | |
121 | sed -e "s/pkgdatadir/pkglibdir/g" -i /usr/sbin/grub-install | |
cd1a2927 | 122 | |
9b0ff0a0 | 123 | mkdir -vp /boot/grub |
0e61af85 | 124 | |
39c645cb | 125 | for i in $(DIR_SRC)/config/bootloader/{grub.conf,splash.xpm.gz}; do \ |
8db8436b | 126 | [ -f $$i ] && cp -vf $$i /boot/grub; \ |
cd1a2927 | 127 | done |
cd1a2927 | 128 | |
283eab18 | 129 | ifeq "$(EMB)" "1" |
147f5e96 MT |
130 | # Enable serial console on embedded build |
131 | sed -e "s/^#serial/serial/" \ | |
132 | -e "s/@SERIAL@/console=ttyS0,9600n8/g" \ | |
133 | -i /boot/grub/grub.conf | |
134 | else | |
135 | # Remove the placeholder @SERIAL@ on non-embedded build | |
136 | sed -e "s/@SERIAL@//g" \ | |
137 | -i /boot/grub/grub.conf | |
138 | endif | |
139 | ||
c1f83efa MT |
140 | # Grub uses anonymous mapping and will be killed by PaX. |
141 | # The following command changes Grub's PaX flags: | |
142 | paxctl -spm /usr/sbin/grub | |
143 | ||
cd1a2927 MT |
144 | @rm -rf $(DIR_APP) |
145 | @$(POSTBUILD) |