rpm: Require and BR mailx.
[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 BuildRequires:   mailx
24
25 # For building manual pages.
26 BuildRequires:   /usr/bin/perldoc
27
28 # Requires camlp4 and ocamlfind at runtime.
29 Requires:        /usr/bin/ocamlc
30 Requires:        ocaml-camlp4-devel
31 Requires:        ocaml-findlib-devel
32
33 # Requires mailx for sending email.
34 Requires:        mailx
35
36
37 %description
38 Whenjobs is a powerful but simple cron replacement.
39
40 Two key advantages over cron are a simpler syntax for writing rules
41 and a powerful dependency system that lets one job depend on variables
42 set when other jobs run (allowing, for example, one job to run only
43 when another job has finished successfully).
44
45
46 %prep
47 %setup -q
48
49
50 %build
51 %configure
52 make %{?_smp_mflags}
53
54
55 %check
56 make check
57
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 make DESTDIR=$RPM_BUILD_ROOT install
63
64 # Add a prelink blacklist.
65 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d
66 cat <<EOF >$RPM_BUILD_ROOT/%{_sysconfdir}/prelink.conf.d/%{name}.conf
67 -b %{_bindir}/whenjobs
68 -b %{_sbindir}/whenjobsd
69 EOF
70
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75
76 %files
77 %defattr(-,root,root,-)
78 %doc COPYING README
79 %{_sysconfdir}/prelink.conf.d/%{name}.conf
80 %{_bindir}/whenjobs
81 %{_sbindir}/whenjobsd
82 %{_libdir}/whenjobs/*.cmi
83 %{_libdir}/whenjobs/pa_when.cmo
84 %{_libdir}/whenjobs/whenlib.cma
85 %{_mandir}/man1/*.1*
86 %{_mandir}/man8/*.8*
87
88
89 %changelog
90 * Fri Feb 17 2012 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
91 - Initial release.