Conditionally build bytecode or native code RPM (thanks Michael Scherer).
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 22 Mar 2012 08:34:52 +0000 (08:34 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 22 Mar 2012 08:34:52 +0000 (08:34 +0000)
whenjobs.spec.in

index 9811e13..cdb3897 100644 (file)
@@ -60,8 +60,10 @@ make check
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
 
+%if %opt
 # Remove bytecode library.
 rm $RPM_BUILD_ROOT%{_libdir}/whenjobs/whenlib.cma
+%endif
 
 # Strip binaries (why doesn't RPM do this?)
 strip --strip-all $RPM_BUILD_ROOT%{_bindir}/whenjobs
@@ -75,7 +77,11 @@ strip --strip-all $RPM_BUILD_ROOT%{_sbindir}/whenjobsd
 %dir %{_libdir}/whenjobs
 %{_libdir}/whenjobs/*.cmi
 %{_libdir}/whenjobs/pa_when.cmo
+%if %opt
 %{_libdir}/whenjobs/whenlib.cmxa
+%else
+%{_libdir}/whenjobs/whenlib.cma
+%endif
 %{_mandir}/man1/*.1*
 %{_mandir}/man8/*.8*