]>
Commit | Line | Data |
---|---|---|
ee4d1a2f ER |
1 | # TODO |
2 | # - x86_64 is broken, use ix86 version | |
18e6ae86 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without doc # build documentation | |
6 | ||
7 | Summary: Smart Boot Manager is an OS independent boot manager | |
8 | Name: btmgr | |
9 | Version: 3.7 | |
ee4d1a2f | 10 | Release: 0.2 |
18e6ae86 ER |
11 | License: GPL v2 |
12 | Group: Applications/System | |
13 | Source0: http://downloads.sourceforge.net/btmgr/%{name}-%{version}-1.tar.gz | |
14 | # Source0-md5: 7bfe432821c3cef48df8b3d6be800009 | |
8713c393 | 15 | Patch0: nasm.patch |
77ac24e4 | 16 | Patch1: major-macro.patch |
18e6ae86 ER |
17 | URL: http://sourceforge.net/projects/btmgr/ |
18 | BuildRequires: nasm | |
19 | BuildRequires: sed >= 4.0 | |
6ecfd37f | 20 | BuildRequires: ucl-devel |
23b9ad33 ER |
21 | %if %{with doc} |
22 | BuildRequires: sgml-tools | |
23 | BuildRequires: tetex-format-latex | |
c608b832 ER |
24 | BuildRequires: tetex-metafont |
25 | BuildRequires: tetex-tex-babel | |
23b9ad33 | 26 | %endif |
18e6ae86 ER |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | The main goals of SBM are to be absolutely OS independent, flexible | |
31 | and full-featured. It has all of the features needed to boot a variety | |
32 | of OSes from several kinds of media, while keeping its size no more | |
33 | than 30K bytes. In another words, SBM does NOT touch any of your | |
34 | partitions, it totally fits into the first track (the hidden track) of | |
35 | your hard disk! SBM now supports booting from floppy, hard disk and | |
36 | CD-ROM. There are plans to support ZIP and LS-120 in the near future. | |
37 | ||
38 | %prep | |
39 | %setup -q -n %{name}-%{version}-1 | |
8713c393 | 40 | %patch0 -p1 |
77ac24e4 | 41 | %patch1 -p1 |
18e6ae86 | 42 | |
23b9ad33 ER |
43 | # allow passing defaults |
44 | %{__sed} -i -e '/^CC=/ s/gcc/$(HOSTCC)/' Makefile | |
45 | %{__sed} -i -e '/^COMMON_FLAGS=/ s/-g/$(CFLAGS)/' Makefile | |
46 | %{__sed} -i -e '/^ASM=/ s/$/ $(AFLAGS)/' Makefile | |
47 | ||
48 | # we run docs in bcond | |
18e6ae86 | 49 | %{__sed} -i -e '/^SUBDIRS=/ s/docs//' Makefile |
23b9ad33 ER |
50 | # pipe breaks error handling |
51 | %{__sed} -i -e '/(MAKE)/ s/|tee -a errors.log//' Makefile | |
18e6ae86 ER |
52 | |
53 | %build | |
23b9ad33 ER |
54 | %{__make} \ |
55 | HOSTCC="%{__cc}" \ | |
56 | CFLAGS="%{rpmcflags}" \ | |
57 | AFLAGS="-w-orphan-labels" | |
18e6ae86 ER |
58 | |
59 | %{?with_doc:%{__make} -C docs} | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | %{__make} install \ | |
64 | PREFIX=$RPM_BUILD_ROOT%{_prefix} | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc AUTHORS ChangeLog CREDITS INSTALL README TODO | |
77ac24e4 | 69 | %doc %lang(zh) README-ZH |
18e6ae86 | 70 | %attr(755,root,root) %{_sbindir}/sbminst |
ee4d1a2f | 71 | %{_datadir}/%{name} |
18e6ae86 ER |
72 | |
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT |