]>
Commit | Line | Data |
---|---|---|
c36e4789 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c36e4789 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = grub |
ec89cb13 | 7 | version = 2.00 |
09fb1694 | 8 | release = 4 |
dc22ea77 | 9 | sup_arches = x86_64 i686 |
c36e4789 | 10 | |
6cec16f1 | 11 | groups = System/Boot |
802ea3af MT |
12 | url = http://www.gnu.org/software/grub/ |
13 | license = GPLv2+ | |
14 | summary = Grand Unified Boot Loader. | |
c36e4789 | 15 | |
802ea3af | 16 | description |
dc22ea77 MT |
17 | GRUB (Grand Unified Boot Loader) is an experimental boot loader |
18 | capable of booting into most free operating systems - Linux, FreeBSD, | |
19 | NetBSD, GNU Mach, and others as well as most commercial operating | |
c36e4789 | 20 | systems. |
802ea3af MT |
21 | end |
22 | ||
ec89cb13 MT |
23 | source_dl = http://ftp.gnu.org/gnu/grub/ ftp://alpha.gnu.org/gnu/grub/ |
24 | sources = %{thisapp}.tar.xz | |
802ea3af | 25 | |
bc7a5ea8 MT |
26 | # Unifont |
27 | unifont = /usr/share/X11/fonts/misc/unifont.pcf.gz | |
28 | ||
802ea3af MT |
29 | build |
30 | requires | |
31 | autoconf | |
dc22ea77 | 32 | autogen |
802ea3af MT |
33 | automake |
34 | bison | |
ec89cb13 | 35 | bzip2-devel |
bc7a5ea8 | 36 | dejavu-fonts-sans-fonts |
802ea3af MT |
37 | flex |
38 | freetype-devel | |
39 | gettext | |
dc22ea77 | 40 | libdevmapper-devel |
802ea3af | 41 | ncurses-devel |
09fb1694 | 42 | paxctl |
802ea3af | 43 | zlib-devel |
bc7a5ea8 | 44 | %{unifont} |
802ea3af MT |
45 | end |
46 | ||
dc22ea77 | 47 | prepare_cmds |
bc7a5ea8 MT |
48 | cp -vf %{unifont} unifont.pcf.gz |
49 | ./autogen.sh | |
dc22ea77 MT |
50 | end |
51 | ||
5218f081 MT |
52 | # As the modules contain always 32 bit code, they |
53 | # should be living in /usr/lib. | |
54 | libdir = %{prefix}/lib | |
55 | ||
802ea3af | 56 | configure_options += \ |
5218f081 | 57 | --target="i386" \ |
5218f081 MT |
58 | --with-platform=pc \ |
59 | --program-transform-name=s,grub,grub, \ | |
60 | --disable-werror \ | |
61 | CFLAGS="$(echo %{CFLAGS} | sed \ | |
ed1822cd MT |
62 | -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' \ |
63 | -e 's/-fstack-protector-all//g' \ | |
5218f081 | 64 | -e 's/-fstack-protector//g' \ |
ed1822cd | 65 | -e 's/-fPIC//g' \ |
5218f081 MT |
66 | -e 's/--param=ssp-buffer-size=4//g' \ |
67 | -e 's/-mregparm=3/-mregparm=4/g' \ | |
68 | -e 's/-fexceptions//g' \ | |
69 | -e 's/-m64//g' \ | |
70 | -e 's/-fasynchronous-unwind-tables//g' )" | |
802ea3af | 71 | |
ed1822cd | 72 | install_cmds |
2af18b56 | 73 | # Install empty configuration file. |
ec89cb13 | 74 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 75 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 76 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
bc7a5ea8 MT |
77 | |
78 | # Don't ship the default theme, replace it by our own one. | |
79 | rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ | |
80 | %{datadir}/grub/themes | |
81 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
82 | cp -rfv %{DIR_SOURCE}/theme/* \ | |
83 | %{BUILDROOT}/boot/grub/themes/system/ | |
84 | ||
85 | # Prepare the fonts. | |
86 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
87 | pushd %{BUILDROOT}/boot/grub/themes/system/ | |
88 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ | |
89 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
90 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ | |
91 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
92 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ | |
93 | -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf | |
94 | popd | |
09fb1694 MT |
95 | |
96 | # Disable hardening. | |
97 | paxctl -mpes \ | |
98 | %{BUILDROOT}%{sbindir}/grub-bios-setup \ | |
99 | %{BUILDROOT}%{sbindir}/grub-probe | |
802ea3af | 100 | end |
ec89cb13 MT |
101 | |
102 | debuginfo_strict_build_id = false | |
802ea3af MT |
103 | end |
104 | ||
105 | quality-agent | |
106 | whitelist_nx | |
09fb1694 | 107 | %{bindir}/*|%{sbindir}/* |
802ea3af MT |
108 | end |
109 | end | |
110 | ||
111 | packages | |
112 | package %{name} | |
113 | requires | |
114 | gettext | |
115 | os-prober | |
bc7a5ea8 | 116 | system-logos >= 2 |
47bdaf55 MT |
117 | end |
118 | ||
ed1822cd MT |
119 | # An EFI version of grub does not exist any more. |
120 | obsoletes | |
121 | grub-efi <= 2.0.0-2 | |
2af18b56 | 122 | end |
dc22ea77 MT |
123 | |
124 | configfiles | |
ed1822cd MT |
125 | /boot/grub/grub.cfg |
126 | /etc/default/grub | |
802ea3af MT |
127 | end |
128 | end | |
1f9bc2f0 MT |
129 | |
130 | package %{name}-debuginfo | |
131 | template DEBUGINFO | |
132 | end | |
802ea3af | 133 | end |