Contents of /trunk/core/fcron/fcron-3.0.4-r1.smage2
Parent Directory | Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 4659 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 4659 byte(s)
import repo
1 | # $Header: /magellan-cvs/smage/fcron/fcron-3.0.4-r1.smage2,v 1.3 2008/02/13 11:49:36 niro Exp $ |
2 | |
3 | PNAME="fcron" |
4 | PVER="3.0.4" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="A periodical command scheduler which aims at replacing Vixie Cron." |
11 | HOMEPAGE="http://fcron.free.fr/" |
12 | |
13 | DEPEND=">= virtual/glibc |
14 | >= virtual/editor |
15 | >= virtual/mta |
16 | >= sys-libs/pam-0.99" |
17 | |
18 | SDEPEND=">= sys-dev/autoconf-4 |
19 | >= sys-dev/automake-3" |
20 | |
21 | PROVIDE="virtual/cron" |
22 | |
23 | SRCFILE="${PNAME}-${PVER}.src.tar.gz" |
24 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
25 | |
26 | sminclude mtools mbuild |
27 | |
28 | SRC_URI=( |
29 | ftp://ftp.seul.org/pub/${PNAME}/${SRCFILE} |
30 | http://fcron.free.fr/archives/${SRCFILE} |
31 | mirror://${PNAME}/${SRCFILE} |
32 | mirror://${PNAME}/run-crons-0.3 |
33 | mirror://${PNAME}/fcron.allow |
34 | mirror://${PNAME}/fcron.deny |
35 | mirror://${PNAME}/fcron.conf-2.9.5.1 |
36 | mirror://${PNAME}/crontab |
37 | mirror://${PNAME}/fcron.rc |
38 | mirror://${PNAME}/fcron.pam |
39 | mirror://${PNAME}/fcrontab.pam |
40 | ) |
41 | |
42 | UP2DATE="updatecmd ftp://ftp.seul.org/pub/${PNAME} | lasttarball gz | sed s/.src//" |
43 | |
44 | src_compile() |
45 | { |
46 | cd ${SRCDIR} |
47 | |
48 | # using systemwide editor as default, but fallback to nano |
49 | mconfigure \ |
50 | --with-username=cron \ |
51 | --with-groupname=cron \ |
52 | --with-piddir=/var/run \ |
53 | --with-etcdir=/etc/fcron \ |
54 | --with-spooldir=/var/spool/cron \ |
55 | --with-fifodir=/var/run \ |
56 | --with-fcrondyn=yes \ |
57 | --with-editor=${EDITOR:=/usr/bin/nano} \ |
58 | --with-sendmail=/usr/sbin/sendmail \ |
59 | --with-pam=yes \ |
60 | --with-selinux=no \ |
61 | || die |
62 | |
63 | mmake || die |
64 | } |
65 | |
66 | src_install() |
67 | { |
68 | cd ${SRCDIR} |
69 | |
70 | # this is needed to keep the correct rights for /var |
71 | minstalldir /var || die |
72 | # this is needed to keep the correct rights for /etc |
73 | minstalldir /etc || die |
74 | |
75 | # general needed cron-files (dcron vcron etc, uses this also) |
76 | minstalldir /usr/sbin || die |
77 | minstallexec -s run-crons-0.3 /usr/sbin/run-crons || die |
78 | mkeepdir /etc/cron.d || die |
79 | mkeepdir /etc/cron.hourly || die |
80 | mkeepdir /etc/cron.daily || die |
81 | mkeepdir /etc/cron.weekly || die |
82 | mkeepdir /etc/cron.monthly || die |
83 | mkeepdir /var/spool/cron || die |
84 | mkeepdir /var/spool/cron/lastrun || die |
85 | |
86 | |
87 | # fcron needed directories |
88 | minstalldir /etc/fcron || die |
89 | minstalldir /usr/sbin || die |
90 | mkeepdir /var/spool/cron/fcrontabs || die |
91 | |
92 | # install fcron bins |
93 | minstallexec fcron /usr/sbin || die |
94 | minstallexec fcrontab || die |
95 | minstallexec fcrondyn || die |
96 | minstallexec fcronsighup /usr/bin || die |
97 | mlink fcrontab /usr/bin/crontab || die |
98 | |
99 | # install etc |
100 | minstallfile -s fcron.allow /etc/fcron || die |
101 | minstallfile -s fcron.deny /etc/fcron || die |
102 | minstallfile -s fcron.conf-2.9.5.1 /etc/fcron/fcron.conf || die |
103 | minstalletc crontab || die |
104 | |
105 | # init script |
106 | minstallrc fcron.rc fcron || die |
107 | |
108 | # pam related |
109 | minstallpam fcron.pam fcron || die |
110 | minstallpam fcrontab.pam fcrontab || die |
111 | |
112 | # now fix all permissions |
113 | # |
114 | # fix owner (run it before suid bits are set, or they wil be reseted) |
115 | mchown root:cron /var/spool/cron || die |
116 | mchown cron:cron /var/spool/cron/fcrontabs || die |
117 | mchown cron:cron /usr/bin/fcrontab || die |
118 | mchown cron:cron /usr/bin/fcrondyn || die |
119 | mchown root:cron /usr/bin/fcronsighup || die |
120 | mchown root:cron /etc/fcron/fcron.allow || die |
121 | mchown root:cron /etc/fcron/fcron.deny || die |
122 | mchown root:cron /etc/fcron/fcron.conf || die |
123 | # |
124 | # directories |
125 | mchmod 0750 /etc/cron.d || die |
126 | mchmod 0750 /etc/cron.hourly || die |
127 | mchmod 0750 /etc/cron.daily || die |
128 | mchmod 0750 /etc/cron.weekly || die |
129 | mchmod 0750 /etc/cron.monthly || die |
130 | mchmod 0750 /var/spool/cron || die |
131 | mchmod 0750 /var/spool/cron/lastrun || die |
132 | mchmod 0770 /var/spool/cron/fcrontabs || die |
133 | # |
134 | # files |
135 | mchmod 0755 /usr/sbin/fcron || die |
136 | mchmod 6755 /usr/bin/fcrontab || die |
137 | mchmod 6755 /usr/bin/fcrondyn || die |
138 | mchmod 6755 /usr/bin/fcronsighup || die |
139 | mchmod 0640 /etc/fcron/fcron.allow || die |
140 | mchmod 0640 /etc/fcron/fcron.deny || die |
141 | mchmod 0640 /etc/fcron/fcron.conf || die |
142 | |
143 | # temporary disabled, enable it as soon as docbook gets into the tree |
144 | # # man pages |
145 | # minstallman doc/man/*.1 || die |
146 | # minstallman doc/man/*.3 || die |
147 | # minstallman doc/man/*.5 || die |
148 | # minstallman doc/man/*.8 || die |
149 | |
150 | minstalldocs MANIFEST README VERSION || die |
151 | } |
152 | |
153 | postinstall() |
154 | { |
155 | # needed to run fcron |
156 | touch ${MROOT}/var/log/wtmp |
157 | |
158 | mstartservice fcron |
159 | |
160 | echo |
161 | echo "Each user who uses fcron should be added to the cron group" |
162 | echo "in /etc/group and also be added in /etc/fcron/fcron.allow" |
163 | echo |
164 | echo "To activate /etc/cron.{hourly|daily|weekly|montly} please run: " |
165 | echo "crontab /etc/crontab" |
166 | echo |
167 | echo "To run fcron at system boot please run: " |
168 | echo "rc-config add fcron" |
169 | echo |
170 | echo "!!! That will replace root's current crontab !!!" |
171 | echo |
172 | } |
173 | |
174 | postremove() |
175 | { |
176 | if [ ! -f ${MROOT}/usr/sbin/fcron ] |
177 | then |
178 | mstopservice fcron |
179 | fi |
180 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |