X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=whenjobs.spec.in;h=cdb38978977f1f6a8c1382246cc2dc8f6bede71d;hp=70b85fb2bb2dc1f51c39798775ffc0f801cac259;hb=HEAD;hpb=61cad7bbaf63389b520b695eefdd735bc11a8aa6 diff --git a/whenjobs.spec.in b/whenjobs.spec.in index 70b85fb..cdb3897 100644 --- a/whenjobs.spec.in +++ b/whenjobs.spec.in @@ -1,9 +1,9 @@ -%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%define debug_package %{nil} +%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%global debug_package %{nil} Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ -Release: 1 +Release: @RPM_RELEASE@%{?dist} Summary: Replacement for cron with dependencies Group: Development/Libraries @@ -17,15 +17,23 @@ BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-calendar-devel >= 2 BuildRequires: ocaml-ocamlnet-devel >= 3 BuildRequires: ocaml-camlp4-devel +BuildRequires: mailx # For building manual pages. BuildRequires: /usr/bin/perldoc +# Not clear what requires this, but it is needed. +BuildRequires: pcre-devel +BuildRequires: ocaml-pcre-devel + # Requires camlp4 and ocamlfind at runtime. Requires: /usr/bin/ocamlc Requires: ocaml-camlp4-devel Requires: ocaml-findlib-devel +# Requires mailx for sending email. +Requires: mailx + %description Whenjobs is a powerful but simple cron replacement. @@ -50,26 +58,34 @@ make check %install -rm -rf $RPM_BUILD_ROOT - make DESTDIR=$RPM_BUILD_ROOT install +%if %opt +# Remove bytecode library. +rm $RPM_BUILD_ROOT%{_libdir}/whenjobs/whenlib.cma +%endif -%clean -rm -rf $RPM_BUILD_ROOT +# 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 -%defattr(-,root,root,-) %doc COPYING README %{_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 -* Fri Feb 17 2012 Richard W.M. Jones - @PACKAGE_VERSION@-1 +* Wed Mar 21 2012 Richard W.M. Jones - @PACKAGE_VERSION@-@RPM_RELEASE@ - Initial release.