Don't need to clean buildroot (thanks Michael Scherer).
[whenjobs.git] / whenjobs.spec.in
1 %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
2 %global debug_package %{nil}
3
4 Name:            @PACKAGE_NAME@
5 Version:         @PACKAGE_VERSION@
6 Release:         @RPM_RELEASE@%{?dist}
7 Summary:         Replacement for cron with dependencies
8
9 Group:           Development/Libraries
10 License:         GPLv2+
11 URL:             http://people.redhat.com/~rjones/whenjobs
12 Source0:         http://people.redhat.com/~rjones/whenjobs/files/%{name}-%{version}.tar.gz
13
14 BuildRequires:   ocaml >= 3.12.0
15 BuildRequires:   ocaml-ocamldoc
16 BuildRequires:   ocaml-findlib-devel
17 BuildRequires:   ocaml-calendar-devel >= 2
18 BuildRequires:   ocaml-ocamlnet-devel >= 3
19 BuildRequires:   ocaml-camlp4-devel
20 BuildRequires:   mailx
21
22 # For building manual pages.
23 BuildRequires:   /usr/bin/perldoc
24
25 # Not clear what requires this, but it is needed.
26 BuildRequires:   pcre-devel
27 BuildRequires:   ocaml-pcre-devel
28
29 # Requires camlp4 and ocamlfind at runtime.
30 Requires:        /usr/bin/ocamlc
31 Requires:        ocaml-camlp4-devel
32 Requires:        ocaml-findlib-devel
33
34 # Requires mailx for sending email.
35 Requires:        mailx
36
37
38 %description
39 Whenjobs is a powerful but simple cron replacement.
40
41 Two key advantages over cron are a simpler syntax for writing rules
42 and a powerful dependency system that lets one job depend on variables
43 set when other jobs run (allowing, for example, one job to run only
44 when another job has finished successfully).
45
46
47 %prep
48 %setup -q
49
50
51 %build
52 %configure
53 make %{?_smp_mflags}
54
55
56 %check
57 make check
58
59
60 %install
61 make DESTDIR=$RPM_BUILD_ROOT install
62
63 # Remove bytecode library.
64 rm $RPM_BUILD_ROOT%{_libdir}/whenjobs/whenlib.cma
65
66 # Strip binaries (why doesn't RPM do this?)
67 strip --strip-all $RPM_BUILD_ROOT%{_bindir}/whenjobs
68 strip --strip-all $RPM_BUILD_ROOT%{_sbindir}/whenjobsd
69
70
71 %files
72 %doc COPYING README
73 %{_bindir}/whenjobs
74 %{_sbindir}/whenjobsd
75 %dir %{_libdir}/whenjobs
76 %{_libdir}/whenjobs/*.cmi
77 %{_libdir}/whenjobs/pa_when.cmo
78 %{_libdir}/whenjobs/whenlib.cmxa
79 %{_mandir}/man1/*.1*
80 %{_mandir}/man8/*.8*
81
82
83 %changelog
84 * Wed Mar 21 2012 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
85 - Initial release.