Version 0.7.1.
[whenjobs.git] / whenjobs.spec.in
1 %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
2 %define 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 rm -rf $RPM_BUILD_ROOT
62
63 make DESTDIR=$RPM_BUILD_ROOT install
64
65 # Remove bytecode library.
66 rm $RPM_BUILD_ROOT%{_libdir}/whenjobs/whenlib.cma
67
68 # Strip binaries (why doesn't RPM do this?)
69 strip --strip-all $RPM_BUILD_ROOT%{_bindir}/whenjobs
70 strip --strip-all $RPM_BUILD_ROOT%{_sbindir}/whenjobsd
71
72
73 %files
74 %doc COPYING README
75 %{_bindir}/whenjobs
76 %{_sbindir}/whenjobsd
77 %dir %{_libdir}/whenjobs
78 %{_libdir}/whenjobs/*.cmi
79 %{_libdir}/whenjobs/pa_when.cmo
80 %{_libdir}/whenjobs/whenlib.cmxa
81 %{_mandir}/man1/*.1*
82 %{_mandir}/man8/*.8*
83
84
85 %changelog
86 * Wed Mar 21 2012 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
87 - Initial release.