]> git.pld-linux.org Git - packages/bcron.git/blame - bcron.spec
- new, just for fun, or completeness. based on author's spec
[packages/bcron.git] / bcron.spec
CommitLineData
59869e5f
ER
1# TODO
2# - pldize (sync with other cronds)
3Summary: Bruce's Cron System
4Name: bcron
5Version: 0.09
6Release: 0.1
7License: GPL
8Group: Applications/System
9Source0: http://untroubled.org/bcron/%{name}-%{version}.tar.gz
10URL: http://untroubled.org/bcron/
11BuildRequires: bglibs >= 1.021
12Requires: supervise-scripts >= 3.5
13Requires: ucspi-unix
14Conflicts: dcron
15Conflicts: fcron
16Conflicts: vixie-cron
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
20Bruce's Cron System.
21
22%prep
23%setup -q
24
25%build
26echo "%{__cc} %{rpmcflags}" > conf-cc
27echo "%{__cc} %{rpmldflags}" > conf-ld
28echo "%{_bindir}" > conf-bin
29%{__make}
30
31%install
32rm -rf $RPM_BUILD_ROOT
33install -d $RPM_BUILD_ROOT%{_bindir}
34%{__make} install \
35 install_prefix=$RPM_BUILD_ROOT
36
37install -d $RPM_BUILD_ROOT%{_mandir}/man{1,8}
38cp -a bcron-{exec,sched,spool,start,update}.8 $RPM_BUILD_ROOT%{_mandir}/man8
39cp -a bcrontab.1 $RPM_BUILD_ROOT%{_mandir}/man1
40
41install -d $RPM_BUILD_ROOT/var/service/bcron-{sched/log,spool,update}
42install -p bcron-sched.run $RPM_BUILD_ROOT/var/service/bcron-sched/run
43install -p bcron-sched-log.run $RPM_BUILD_ROOT/var/service/bcron-sched/log/run
44install -p bcron-spool.run $RPM_BUILD_ROOT/var/service/bcron-spool/run
45install -p bcron-update.run $RPM_BUILD_ROOT/var/service/bcron-update/run
46chmod +t $RPM_BUILD_ROOT/var/service/bcron-sched
47
48install -d $RPM_BUILD_ROOT/var/log/bcron
49
50install -d $RPM_BUILD_ROOT/var/spool/cron/{crontabs,tmp}
51mkfifo $RPM_BUILD_ROOT/var/spool/cron/trigger
52
53install -d $RPM_BUILD_ROOT%{_sysconfdir}/bcron
54install -d $RPM_BUILD_ROOT/etc/cron.d
55
56%clean
57rm -rf $RPM_BUILD_ROOT
58
59%pre
60grep -q '^cron:' /etc/group \
61|| groupadd -r cron
62grep -q '^cron:' /etc/passwd \
63|| useradd -r -d /var/spool/cron -s /sbin/nologin -g cron cron
64
65%post
66PATH="$PATH:%{_prefix}/local/bin"
67if [ "$1" = 1 ]; then
68 for svc in bcron-sched bcron-spool bcron-update; do
69 if ! [ -e /service/$svc ]; then
70 svc-add $svc
71 fi
72 done
73else
74 for svc in bcron-sched bcron-spool bcron-update; do
75 svc -t /service/$svc
76 done
77fi
78
79%preun
80if [ "$1" = 0 ]; then
81 for svc in bcron-sched bcron-spool bcron-update; do
82 if [ -L /service/$svc ]; then
83 svc-remove $svc
84 fi
85 done
86fi
87
88%files
89%defattr(644,root,root,755)
90%doc ANNOUNCEMENT COPYING NEWS README
91%doc bcron.texi bcron.html
92%config %dir %{_sysconfdir}/bcron
93%config %dir /etc/cron.d
94
95%attr(755,root,root) %{_bindir}/*
96%{_mandir}/*/*
97
98/var/service/*
99
100%attr(700,cron,cron) %dir /var/spool/cron
101%attr(700,cron,cron) %dir /var/spool/cron/crontabs
102%attr(700,cron,cron) %dir /var/spool/cron/tmp
103%attr(600,cron,cron) /var/spool/cron/trigger
104
105%attr(700,root,root) %dir /var/log/bcron
This page took 0.063591 seconds and 4 git commands to generate.