]>
Commit | Line | Data |
---|---|---|
0a76862c | 1 | # |
2 | # TODO | |
3 | # - burgemu notes | |
4 | # --enable-burg-emu-usb conflicts with --enable-burg-emu-pci, emu-pci seems experimental | |
5 | # - to build and install the `burg-emu' debugging utility we need to re-run build with --target=emu | |
6 | # - put burg-emu to subpackage if it is fixed | |
7 | # - merge more from grub2.spec | |
8 | # - desc | |
9 | # | |
10 | # Conditional build: | |
11 | %bcond_with burgemu # build burg-emu debugging utility | |
12 | # | |
13 | %define rev r1844 | |
14 | Summary: - | |
15 | Summary(pl.UTF-8): - | |
16 | Name: burg | |
17 | Version: 1.98.%{rev} | |
18 | Release: 0.%{rev}.1 | |
19 | License: GPL v3+ | |
20 | Group: Base | |
21 | Source0: %{name}-%{version}-bzr.tar.gz | |
22 | # Source0-md5: 19b8ec2fe6208788bcf877c5a3b7e91d | |
23 | Source3: burg.sysconfig | |
24 | Source4: burg-custom.cfg | |
25 | Patch0: pld-initrd.patch | |
26 | Patch1: pld-sysconfdir.patch | |
27 | Patch2: %{name}-garbage.patch | |
28 | Patch3: %{name}-shelllib.patch | |
29 | Patch4: %{name}-install.in.patch | |
30 | Patch5: %{name}-lvmdevice.patch | |
31 | Patch6: pld-mkconfigdir.patch | |
32 | # TODO: needs updates | |
33 | Patch7: %{name}-mkconfig-diagnostics.patch | |
34 | URL: https://launchpad.net/~bean123ch/+archive/burg | |
35 | BuildRequires: autoconf | |
36 | BuildRequires: automake | |
37 | BuildRequires: bison | |
38 | BuildRequires: gawk | |
39 | BuildRequires: help2man | |
40 | BuildRequires: ruby | |
41 | BuildRequires: texinfo | |
42 | %ifarch %{ix86} %{x8664} | |
43 | BuildRequires: lzo-devel >= 1.0.2 | |
44 | %endif | |
45 | %ifarch %{x8664} | |
46 | BuildRequires: /usr/lib/libc.so | |
47 | %if "%{pld_release}" == "ac" | |
48 | BuildRequires: libgcc32 | |
49 | %else | |
50 | BuildRequires: gcc-multilib | |
51 | %endif | |
52 | %endif | |
53 | BuildRequires: ncurses-devel | |
54 | BuildRequires: rpm >= 4.4.9-56 | |
55 | BuildRequires: rpmbuild(macros) >= 1.213 | |
56 | Requires: which | |
57 | Suggests: cdrkit-mkisofs | |
58 | Suggests: os-prober | |
59 | Provides: bootloader | |
60 | Conflicts: grub | |
61 | Conflicts: grub2 | |
62 | ExclusiveArch: %{ix86} %{x8664} ppc sparc64 | |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %define _sbindir /sbin | |
66 | %define _bindir %{_sbindir} | |
67 | %define _libdir /boot | |
68 | %define _libexecdir %{_libdir}/burg | |
69 | ||
70 | %description | |
71 | ||
72 | %description -l pl.UTF-8 | |
73 | ||
74 | %prep | |
75 | %setup -q -n %{name}-%{version}-bzr | |
76 | %patch0 -p1 | |
77 | %patch1 -p1 | |
78 | %patch2 -p1 | |
79 | %patch3 -p1 | |
80 | %patch4 -p1 | |
81 | %patch5 -p1 | |
82 | %patch6 -p1 | |
83 | %patch7 -p1 | |
84 | ||
85 | %build | |
86 | ./autogen.sh | |
87 | export CFLAGS="-Os %{?debug:-g}" | |
88 | %configure \ | |
89 | %if %{with burgemu} | |
90 | --enable-grub-emu-usb \ | |
91 | --enable-grub-emu-sdl \ | |
92 | --enable-grub-emu-pci \ | |
93 | %endif | |
94 | BUILD_CFLAGS="$CFLAGS" | |
95 | %{__make} -j1 \ | |
96 | pkgdatadir=%{_libexecdir} \ | |
97 | pkglibdir=%{_libexecdir} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/burg.d} | |
102 | ||
103 | %{__make} install \ | |
104 | pkgdatadir=%{_libexecdir} \ | |
105 | pkglibdir=%{_libexecdir} \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
107 | ||
108 | cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir} | |
109 | cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/burg | |
110 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/burg.d/custom.cfg | |
111 | cp -a grub-mkconfig_lib $RPM_BUILD_ROOT/lib/burg-mkconfig_lib | |
112 | %{__rm} $RPM_BUILD_ROOT%{_infodir}/dir | |
113 | ||
114 | # deprecated. we don't need it | |
115 | %{__rm} $RPM_BUILD_ROOT/lib/update-burg_lib | |
116 | ||
117 | # no junk to %{_libdir}/grub (put to -devel?) | |
118 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/*.h | |
119 | %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/*.mk | |
120 | ||
121 | # core.img - bootable image generated by burg-mkimage(1) via burg-install(1) | |
122 | touch $RPM_BUILD_ROOT%{_libexecdir}/core.img | |
123 | touch $RPM_BUILD_ROOT%{_libexecdir}/device.map | |
124 | ||
125 | %clean | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %post -p %{_sbindir}/postshell | |
129 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
130 | ||
131 | %postun -p %{_sbindir}/postshell | |
132 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
133 | ||
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc AUTHORS NEWS README THANKS TODO | |
137 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/burg | |
138 | %attr(755,root,root) %{_sbindir}/burg-adduser | |
139 | %attr(755,root,root) %{_sbindir}/burg-bin2h | |
140 | %attr(755,root,root) %{_sbindir}/burg-deluser | |
141 | %attr(755,root,root) %{_sbindir}/burg-editenv | |
142 | %attr(755,root,root) %{_sbindir}/burg-fstest | |
143 | %attr(755,root,root) %{_sbindir}/burg-install | |
144 | %attr(755,root,root) %{_sbindir}/burg-mkconfig | |
145 | %attr(755,root,root) %{_sbindir}/burg-mkelfimage | |
146 | %attr(755,root,root) %{_sbindir}/burg-mkfont | |
147 | %attr(755,root,root) %{_sbindir}/burg-mkimg | |
148 | %attr(755,root,root) %{_sbindir}/burg-mkisofs | |
149 | %attr(755,root,root) %{_sbindir}/burg-mkmod | |
150 | %attr(755,root,root) %{_sbindir}/burg-mkpasswd-pbkdf2 | |
151 | %attr(755,root,root) %{_sbindir}/burg-mkrelpath | |
152 | %attr(755,root,root) %{_sbindir}/burg-mkrescue | |
153 | %attr(755,root,root) %{_sbindir}/burg-objdump | |
154 | %attr(755,root,root) %{_sbindir}/burg-reboot | |
155 | %attr(755,root,root) %{_sbindir}/burg-script-check | |
156 | %attr(755,root,root) %{_sbindir}/burg-set-default | |
157 | %attr(755,root,root) %{_sbindir}/burg-symdb | |
158 | %ifarch %{ix86} %{x8664} | |
159 | %attr(755,root,root) %{_sbindir}/burg-mkimage | |
160 | %{_mandir}/man1/burg-mkimage.1* | |
161 | %else | |
162 | %attr(755,root,root) %{_sbindir}/burg-probe | |
163 | %attr(755,root,root) %{_sbindir}/burg-mkdevicemap | |
164 | %{_mandir}/man8/burg-probe.8* | |
165 | %{_mandir}/man8/burg-mkdevicemap.8* | |
166 | %endif | |
167 | %{_mandir}/man1/burg-bin2h.1* | |
168 | %{_mandir}/man1/burg-editenv.1* | |
169 | %{_mandir}/man1/burg-fstest.1* | |
170 | %{_mandir}/man1/burg-mkelfimage.1* | |
171 | %{_mandir}/man1/burg-mkfont.1* | |
172 | %{_mandir}/man1/burg-mkimg.1* | |
173 | %{_mandir}/man1/burg-mkisofs.1* | |
174 | %{_mandir}/man1/burg-mkmod.1* | |
175 | %{_mandir}/man1/burg-mkpasswd-pbkdf2.1* | |
176 | %{_mandir}/man1/burg-mkrelpath.1* | |
177 | %{_mandir}/man1/burg-mkrescue.1* | |
178 | %{_mandir}/man1/burg-objdump.1* | |
179 | %{_mandir}/man1/burg-script-check.1* | |
180 | %{_mandir}/man1/burg-symdb.1* | |
181 | %{_mandir}/man8/burg-adduser.8* | |
182 | %{_mandir}/man8/burg-deluser.8* | |
183 | %{_mandir}/man8/burg-install.8* | |
184 | %{_mandir}/man8/burg-mkconfig.8* | |
185 | %{_mandir}/man8/burg-reboot.8* | |
186 | %{_mandir}/man8/burg-set-default.8* | |
187 | %if %{with burgemu} | |
188 | %attr(755,root,root) %{_sbindir}/burg-emu | |
189 | %{_mandir}/man8/burg-emu.8* | |
190 | %endif | |
191 | /lib/burg-mkconfig_lib | |
192 | ||
193 | %dir %{_libexecdir} | |
194 | %config(noreplace) %verify(not md5 mtime size) %{_libexecdir}/grub.cfg | |
195 | %{_libexecdir}/*.mod | |
196 | %{_libexecdir}/*.lst | |
197 | %ifarch %{ix86} %{x8664} sparc sparc64 | |
198 | %{_libexecdir}%{_libdir}.img | |
199 | %{_libexecdir}/cdboot.img | |
200 | %{_libexecdir}/diskboot.img | |
201 | %{_libexecdir}/lnxboot.img | |
202 | %{_libexecdir}/pxeboot.img | |
203 | %endif | |
204 | ||
205 | # generated by grub at runtime | |
206 | %ghost %{_libexecdir}/device.map | |
207 | %ghost %{_libexecdir}/core.img | |
208 | ||
209 | %dir /lib/burg.d | |
210 | %doc /lib/burg.d/README | |
211 | %attr(755,root,root) /lib/burg.d/00_header | |
212 | %attr(755,root,root) /lib/burg.d/10_linux | |
213 | %attr(755,root,root) /lib/burg.d/30_os-prober | |
214 | %attr(755,root,root) /lib/burg.d/40_custom | |
215 | ||
216 | %dir %attr(750,root,root) %{_sysconfdir}/burg.d | |
217 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/burg.d/custom.cfg | |
218 | ||
219 | %ifarch %{ix86} %{x8664} | |
220 | %attr(755,root,root) %{_sbindir}/burg-mkdevicemap | |
221 | %attr(755,root,root) %{_sbindir}/burg-probe | |
222 | %attr(755,root,root) %{_sbindir}/burg-setup | |
223 | %{_mandir}/man8/burg-mkdevicemap.8* | |
224 | %{_mandir}/man8/burg-probe.8* | |
225 | %{_mandir}/man8/burg-setup.8* | |
226 | %endif | |
227 | ||
228 | %{_infodir}/burg*.info* |