Fix double-scheduled timer problem caused by reloading the jobs file.
[whenjobs.git] / whenjobs.spec.in
1 %define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
2 %define debug_package %{nil}
3
4 # Prevent unwanted bytecode stripping by RPM.
5 %define __strip /bin/true
6
7 Name:            @PACKAGE_NAME@
8 Version:         @PACKAGE_VERSION@
9 Release:         @RPM_RELEASE@
10 Summary:         Replacement for cron with dependencies
11
12 Group:           Development/Libraries
13 License:         GPLv2+
14 URL:             http://people.redhat.com/~rjones/whenjobs
15 Source0:         http://people.redhat.com/~rjones/whenjobs/files/%{name}-%{version}.tar.gz
16
17 BuildRequires:   ocaml >= 3.12.0
18 BuildRequires:   ocaml-ocamldoc
19 BuildRequires:   ocaml-findlib-devel
20 BuildRequires:   ocaml-calendar-devel >= 2
21 BuildRequires:   ocaml-ocamlnet-devel >= 3
22 BuildRequires:   ocaml-camlp4-devel
23
24 # For building manual pages.
25 BuildRequires:   /usr/bin/perldoc
26
27 # Requires camlp4 and ocamlfind at runtime.
28 Requires:        /usr/bin/ocamlc
29 Requires:        ocaml-camlp4-devel
30 Requires:        ocaml-findlib-devel
31
32
33 %description
34 Whenjobs is a powerful but simple cron replacement.
35
36 Two key advantages over cron are a simpler syntax for writing rules
37 and a powerful dependency system that lets one job depend on variables
38 set when other jobs run (allowing, for example, one job to run only
39 when another job has finished successfully).
40
41
42 %prep
43 %setup -q
44
45
46 %build
47 %configure
48 make %{?_smp_mflags}
49
50
51 %check
52 make check
53
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 make DESTDIR=$RPM_BUILD_ROOT install
59
60 # Add a prelink blacklist.
61 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d
62 cat <<EOF >$RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d/%{name}.conf
63 -b %{_bindir}/whenjobs
64 -b %{_sbindir}/whenjobsd
65 EOF
66
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71
72 %files
73 %defattr(-,root,root,-)
74 %doc COPYING README
75 %{_sysconfdir}/prelink.conf.d/%{name}.conf
76 %{_bindir}/whenjobs
77 %{_sbindir}/whenjobsd
78 %{_libdir}/whenjobs/*.cmi
79 %{_libdir}/whenjobs/pa_when.cmo
80 %{_libdir}/whenjobs/whenlib.cma
81 %{_mandir}/man1/*.1*
82 %{_mandir}/man8/*.8*
83
84
85 %changelog
86 * Fri Feb 17 2012 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
87 - Initial release.