]> git.pld-linux.org Git - packages/bcron.git/blob - bcron.spec
- new, just for fun, or completeness. based on author's spec
[packages/bcron.git] / bcron.spec
1 # TODO
2 # - pldize (sync with other cronds)
3 Summary:        Bruce's Cron System
4 Name:           bcron
5 Version:        0.09
6 Release:        0.1
7 License:        GPL
8 Group:          Applications/System
9 Source0:        http://untroubled.org/bcron/%{name}-%{version}.tar.gz
10 URL:            http://untroubled.org/bcron/
11 BuildRequires:  bglibs >= 1.021
12 Requires:       supervise-scripts >= 3.5
13 Requires:       ucspi-unix
14 Conflicts:      dcron
15 Conflicts:      fcron
16 Conflicts:      vixie-cron
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 Bruce's Cron System.
21
22 %prep
23 %setup -q
24
25 %build
26 echo "%{__cc} %{rpmcflags}" > conf-cc
27 echo "%{__cc} %{rpmldflags}" > conf-ld
28 echo "%{_bindir}" > conf-bin
29 %{__make}
30
31 %install
32 rm -rf $RPM_BUILD_ROOT
33 install -d $RPM_BUILD_ROOT%{_bindir}
34 %{__make} install \
35         install_prefix=$RPM_BUILD_ROOT
36
37 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,8}
38 cp -a bcron-{exec,sched,spool,start,update}.8 $RPM_BUILD_ROOT%{_mandir}/man8
39 cp -a bcrontab.1 $RPM_BUILD_ROOT%{_mandir}/man1
40
41 install -d $RPM_BUILD_ROOT/var/service/bcron-{sched/log,spool,update}
42 install -p bcron-sched.run $RPM_BUILD_ROOT/var/service/bcron-sched/run
43 install -p bcron-sched-log.run $RPM_BUILD_ROOT/var/service/bcron-sched/log/run
44 install -p bcron-spool.run $RPM_BUILD_ROOT/var/service/bcron-spool/run
45 install -p bcron-update.run $RPM_BUILD_ROOT/var/service/bcron-update/run
46 chmod +t $RPM_BUILD_ROOT/var/service/bcron-sched
47
48 install -d $RPM_BUILD_ROOT/var/log/bcron
49
50 install -d $RPM_BUILD_ROOT/var/spool/cron/{crontabs,tmp}
51 mkfifo $RPM_BUILD_ROOT/var/spool/cron/trigger
52
53 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bcron
54 install -d $RPM_BUILD_ROOT/etc/cron.d
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %pre
60 grep -q '^cron:' /etc/group \
61 || groupadd -r cron
62 grep -q '^cron:' /etc/passwd \
63 || useradd -r -d /var/spool/cron -s /sbin/nologin -g cron cron
64
65 %post
66 PATH="$PATH:%{_prefix}/local/bin"
67 if [ "$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
73 else
74   for svc in bcron-sched bcron-spool bcron-update; do
75         svc -t /service/$svc
76   done
77 fi
78
79 %preun
80 if [ "$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
86 fi
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.14815 seconds and 3 git commands to generate.