File: bcron-0.11.spec

package info (click to toggle)
bcron 0.11-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 752 kB
  • sloc: sh: 3,099; ansic: 2,416; makefile: 28
file content (102 lines) | stat: -rw-r--r-- 2,298 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Name: bcron
Summary: Bruce's Cron System
Version: 0.11
Release: 1
License: GPL
Group: Utilities/System
Source: http://untroubled.org/bcron/bcron-0.11.tar.gz
BuildRoot: %{_tmppath}/bcron-buildroot
URL: http://untroubled.org/bcron/
Packager: Bruce Guenter <bruce@untroubled.org>
BuildRequires: bglibs >= 2.02
Requires: ucspi-unix
Requires: supervise-scripts >= 3.5
Conflicts: vixie-cron
Conflicts: fcron
Conflicts: dcron

%description
Bruce's Cron System

%prep
%setup
echo gcc "%{optflags}" >conf-cc
echo gcc -s >conf-ld
echo %{_bindir} >conf-bin
echo %{_mandir} >conf-man

%build
make

%install
rm -fr %{buildroot}
make install_prefix=%{buildroot} install

mkdir -p %{buildroot}/var/service/bcron-{sched/log,spool,update}
install -m 755 bcron-sched.run %{buildroot}/var/service/bcron-sched/run
install -m 755 bcron-sched-log.run %{buildroot}/var/service/bcron-sched/log/run
install -m 755 bcron-spool.run %{buildroot}/var/service/bcron-spool/run
install -m 755 bcron-update.run %{buildroot}/var/service/bcron-update/run
chmod +t %{buildroot}/var/service/bcron-sched

mkdir -p %{buildroot}/var/log/bcron

mkdir -p %{buildroot}/var/spool/cron/{crontabs,tmp}
mkfifo %{buildroot}/var/spool/cron/trigger

mkdir -p %{buildroot}/etc/bcron
mkdir -p %{buildroot}/etc/cron.d

%clean
rm -rf %{buildroot}

%pre
grep -q '^cron:' /etc/group \
|| groupadd -r cron
grep -q '^cron:' /etc/passwd \
|| useradd -r -d /var/spool/cron -s /sbin/nologin -g cron cron

%post
PATH="$PATH:/usr/local/bin"
if [ "$1" = 1 ]; then
  for svc in bcron-sched bcron-spool bcron-update; do
    if ! [ -e /service/$svc ]; then
      svc-add $svc
    fi
  done
else
  for svc in bcron-sched bcron-spool bcron-update; do
    svc -t /service/$svc
  done
fi

%preun
if [ "$1" = 0 ]; then
  for svc in bcron-sched bcron-spool bcron-update; do
    if [ -L /service/$svc ]; then
      svc-remove $svc
    fi
  done
fi

%files

%defattr(-,root,root)

%doc ANNOUNCEMENT COPYING NEWS README
%doc bcron.texi bcron.html

%config %dir /etc/bcron
%config %dir /etc/cron.d

%{_bindir}/*
%{_mandir}/*/*

/var/service/*

%attr(700,cron,cron) %dir /var/spool/cron
%attr(700,cron,cron) %dir /var/spool/cron/crontabs
%attr(700,cron,cron) %dir /var/spool/cron/tmp
%attr(600,cron,cron)      /var/spool/cron/trigger

%attr(700,root,root) %dir /var/log/bcron