]> git.pld-linux.org Git - packages/btmgr.git/blobdiff - btmgr.spec
- x86_64 does not understand "-t us", pff
[packages/btmgr.git] / btmgr.spec
index ce703784b1e7a9c7128c18374a32de957bdd808b..a23be296681a4d6eb433362dfab113f219f77d3c 100644 (file)
@@ -1,3 +1,5 @@
+# TODO
+# - x86_64 is broken, use ix86 version
 #
 # Conditional build:
 %bcond_without doc             # build documentation
@@ -5,15 +7,23 @@
 Summary:       Smart Boot Manager is an OS independent boot manager
 Name:          btmgr
 Version:       3.7
-Release:       0.1
+Release:       0.2
 License:       GPL v2
 Group:         Applications/System
 Source0:       http://downloads.sourceforge.net/btmgr/%{name}-%{version}-1.tar.gz
 # Source0-md5: 7bfe432821c3cef48df8b3d6be800009
+Patch0:                nasm.patch
+Patch1:                major-macro.patch
 URL:           http://sourceforge.net/projects/btmgr/
 BuildRequires: nasm
 BuildRequires: sed >= 4.0
-%{?with_doc:BuildRequires:     sgml-tools}
+BuildRequires: ucl-devel
+%if %{with doc}
+BuildRequires: sgml-tools
+BuildRequires: tetex-format-latex
+BuildRequires: tetex-metafont
+BuildRequires: tetex-tex-babel
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -27,12 +37,24 @@ CD-ROM. There are plans to support ZIP and LS-120 in the near future.
 
 %prep
 %setup -q -n %{name}-%{version}-1
+%patch0 -p1
+%patch1 -p1
 
-%{__sed} -i -e '/^CC=/ s/gcc/%{__cc}/' Makefile
+# allow passing defaults
+%{__sed} -i -e '/^CC=/ s/gcc/$(HOSTCC)/' Makefile
+%{__sed} -i -e '/^COMMON_FLAGS=/ s/-g/$(CFLAGS)/' Makefile
+%{__sed} -i -e '/^ASM=/ s/$/ $(AFLAGS)/' Makefile
+
+# we run docs in bcond
 %{__sed} -i -e '/^SUBDIRS=/ s/docs//' Makefile
+# pipe breaks error handling
+%{__sed} -i -e '/(MAKE)/ s/|tee -a errors.log//' Makefile
 
 %build
-%{__make}
+%{__make} \
+       HOSTCC="%{__cc}" \
+       CFLAGS="%{rpmcflags}" \
+       AFLAGS="-w-orphan-labels"
 
 %{?with_doc:%{__make} -C docs}
 
@@ -44,9 +66,9 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog CREDITS INSTALL README TODO
-%doc(zh) README-ZH
+%doc %lang(zh) README-ZH
 %attr(755,root,root) %{_sbindir}/sbminst
-%{_datadir}/btmgr
+%{_datadir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.1115 seconds and 4 git commands to generate.