]>
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 |
a97b1003 | 8 | release = 5.1 |
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 | 62 | -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' \ |
a97b1003 | 63 | -e 's/-fstack-protector-strong//g' \ |
ed1822cd | 64 | -e 's/-fstack-protector-all//g' \ |
5218f081 | 65 | -e 's/-fstack-protector//g' \ |
ed1822cd | 66 | -e 's/-fPIC//g' \ |
5218f081 MT |
67 | -e 's/--param=ssp-buffer-size=4//g' \ |
68 | -e 's/-mregparm=3/-mregparm=4/g' \ | |
69 | -e 's/-fexceptions//g' \ | |
70 | -e 's/-m64//g' \ | |
71 | -e 's/-fasynchronous-unwind-tables//g' )" | |
802ea3af | 72 | |
ed1822cd | 73 | install_cmds |
2af18b56 | 74 | # Install empty configuration file. |
ec89cb13 | 75 | mkdir -pv %{BUILDROOT}/boot/grub |
2af18b56 | 76 | touch %{BUILDROOT}/boot/grub/grub.cfg |
ec89cb13 | 77 | ln -svf ../boot/grub/grub.cfg %{BUILDROOT}%{sysconfdir}/grub2.cfg |
bc7a5ea8 MT |
78 | |
79 | # Don't ship the default theme, replace it by our own one. | |
80 | rm -rfv %{BUILDROOT}/boot/grub/themes/starfield \ | |
81 | %{datadir}/grub/themes | |
82 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
83 | cp -rfv %{DIR_SOURCE}/theme/* \ | |
84 | %{BUILDROOT}/boot/grub/themes/system/ | |
85 | ||
86 | # Prepare the fonts. | |
87 | mkdir -pv %{BUILDROOT}/boot/grub/themes/system | |
88 | pushd %{BUILDROOT}/boot/grub/themes/system/ | |
89 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-10.pf2 -s 10 \ | |
90 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
91 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-12.pf2 -s 12 \ | |
92 | %{datadir}/fonts/dejavu/DejaVuSans.ttf | |
93 | %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \ | |
94 | -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf | |
95 | popd | |
09fb1694 MT |
96 | |
97 | # Disable hardening. | |
98 | paxctl -mpes \ | |
99 | %{BUILDROOT}%{sbindir}/grub-bios-setup \ | |
100 | %{BUILDROOT}%{sbindir}/grub-probe | |
46481a44 SS |
101 | |
102 | paxctl -mpex \ | |
103 | %{BUILDROOT}%{bindir}/grub-script-check | |
802ea3af | 104 | end |
ec89cb13 MT |
105 | |
106 | debuginfo_strict_build_id = false | |
802ea3af MT |
107 | end |
108 | ||
109 | quality-agent | |
110 | whitelist_nx | |
09fb1694 | 111 | %{bindir}/*|%{sbindir}/* |
802ea3af MT |
112 | end |
113 | end | |
114 | ||
115 | packages | |
116 | package %{name} | |
117 | requires | |
118 | gettext | |
119 | os-prober | |
bc7a5ea8 | 120 | system-logos >= 2 |
47bdaf55 MT |
121 | end |
122 | ||
ed1822cd MT |
123 | # An EFI version of grub does not exist any more. |
124 | obsoletes | |
125 | grub-efi <= 2.0.0-2 | |
2af18b56 | 126 | end |
dc22ea77 MT |
127 | |
128 | configfiles | |
ed1822cd MT |
129 | /boot/grub/grub.cfg |
130 | /etc/default/grub | |
802ea3af MT |
131 | end |
132 | end | |
1f9bc2f0 MT |
133 | |
134 | package %{name}-debuginfo | |
135 | template DEBUGINFO | |
136 | end | |
802ea3af | 137 | end |