From 2c27f26c486961d1b7799d4f4274aa31d04df845 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 22 Mar 2012 08:34:52 +0000 Subject: [PATCH] Conditionally build bytecode or native code RPM (thanks Michael Scherer). --- whenjobs.spec.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/whenjobs.spec.in b/whenjobs.spec.in index 9811e13..cdb3897 100644 --- a/whenjobs.spec.in +++ b/whenjobs.spec.in @@ -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* -- 1.8.3.1