X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=whenjobs.spec.in;h=cdb38978977f1f6a8c1382246cc2dc8f6bede71d;hp=8b663e44324c27bf2ea443230f61cf6f6f9d785a;hb=27dfc74b71d3b3b14a476667481f92c58a6d5c1d;hpb=7e01f4e655c5ceadbb571f4ded19427b41ae2933 diff --git a/whenjobs.spec.in b/whenjobs.spec.in index 8b663e4..cdb3897 100644 --- a/whenjobs.spec.in +++ b/whenjobs.spec.in @@ -1,8 +1,5 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} - -# Prevent unwanted bytecode stripping by RPM. -%define __strip /bin/true +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ @@ -61,31 +58,34 @@ make check %install -rm -rf $RPM_BUILD_ROOT - make DESTDIR=$RPM_BUILD_ROOT install -# Add a prelink blacklist. -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d -cat <$RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d/%{name}.conf --b %{_bindir}/whenjobs --b %{_sbindir}/whenjobsd -EOF +%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 +strip --strip-all $RPM_BUILD_ROOT%{_sbindir}/whenjobsd %files %doc COPYING README -%{_sysconfdir}/prelink.conf.d/%{name}.conf %{_bindir}/whenjobs %{_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* %changelog -* Sun Mar 18 2012 Richard W.M. Jones - @PACKAGE_VERSION@-@RPM_RELEASE@ +* Wed Mar 21 2012 Richard W.M. Jones - @PACKAGE_VERSION@-@RPM_RELEASE@ - Initial release.