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