Contents of /branches/R11-stable/core/cronie/cronie-1.4.12-r1.smage2
Parent Directory | Revision Log
Revision 22680 -
(show annotations)
(download)
Tue Oct 28 08:20:28 2014 UTC (9 years, 11 months ago) by niro
File size: 2891 byte(s)
Tue Oct 28 08:20:28 2014 UTC (9 years, 11 months ago) by niro
File size: 2891 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="cronie" |
4 | PVER="1.4.12" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-apps" |
8 | |
9 | DESCRIPTION="A periodical command scheduler." |
10 | HOMEPAGE="https://fedorahosted.org/cronie/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= virtual/editor |
14 | >= virtual/mta |
15 | >= sys-libs/pam-1.1 |
16 | >= virtual/debianutils |
17 | >= sys-apps/pm-utils-1.4" |
18 | |
19 | SDEPEND=">= sys-dev/autoconf-5 |
20 | >= sys-dev/automake-4" |
21 | |
22 | PROVIDE="virtual/cron" |
23 | |
24 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
25 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
26 | |
27 | sminclude mtools systemd |
28 | |
29 | SRC_URI=( |
30 | https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${SRCFILE} |
31 | mirror://${PNAME}/${SRCFILE} |
32 | mirror://${PNAME}/cronie.deny |
33 | mirror://${PNAME}/crontab |
34 | mirror://${PNAME}/crontabs.4 |
35 | mirror://${PNAME}/cronie.pam |
36 | mirror://${PNAME}/cronie.service |
37 | ) |
38 | |
39 | UP2DATE="updatecmd 'https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/?C=M;O=A' | lasttarball gz" |
40 | |
41 | src_prepare() |
42 | { |
43 | munpack ${SRCFILE} || die |
44 | cd ${SRCDIR} |
45 | |
46 | # log to syslog by default |
47 | sed -i 's:^\(CRONDARGS=\).*:\1"-s":' crond.sysconfig || die |
48 | } |
49 | |
50 | src_compile() |
51 | { |
52 | cd ${SRCDIR} |
53 | |
54 | mconfigure \ |
55 | --localstatedir=/var \ |
56 | --enable-anacron \ |
57 | --enable-pie \ |
58 | --with-pam \ |
59 | --with-inotify \ |
60 | --without-audit \ |
61 | --without-selinux \ |
62 | || die |
63 | |
64 | mmake || die |
65 | } |
66 | |
67 | src_install() |
68 | { |
69 | cd ${SRCDIR} |
70 | mmake DESTDIR=${BINDIR} install || die |
71 | mchmod 4755 /usr/bin/crontab || die |
72 | |
73 | # general needed cron-files (dcron vcron etc, uses this also) |
74 | mkeepdir /etc/cron.d || die |
75 | mkeepdir /etc/cron.hourly || die |
76 | mkeepdir /etc/cron.daily || die |
77 | mkeepdir /etc/cron.weekly || die |
78 | mkeepdir /etc/cron.monthly || die |
79 | mkeepdir /var/spool/cron || die |
80 | |
81 | # cronie needed directories |
82 | mkeepdir /var/spool/anacron || die |
83 | |
84 | # install etc |
85 | minstallfile -s cronie.deny /etc/cron.deny || die |
86 | minstallconf ${SRCDIR}/crond.sysconfig cronie || die |
87 | minstallfile contrib/anacrontab /etc/anacrontab || die |
88 | minstallfile contrib/0hourly /etc/cron.d/0hourly || die |
89 | minstallexec contrib/0anacron /etc/cron.hourly/0anacron || die |
90 | minstallfile -s crontab /etc/crontab || die |
91 | minstallman ${SOURCEDIR}/${PNAME}/crontabs.4 || die |
92 | |
93 | # systemd unit |
94 | minstallunit cronie.service || die |
95 | |
96 | # pam related |
97 | minstallpam cronie.pam crond || die |
98 | |
99 | minstalldocs AUTHORS ChangeLog COPYING NEWS README || die |
100 | } |
101 | |
102 | preinstall() |
103 | { |
104 | if [[ ! -z $(magequery -n fcron) ]] |
105 | then |
106 | echo -e ${COLRED} |
107 | echo -e "Error: sys-apps/fcron is installed!!" |
108 | echo -e "fcron cannot be installed side-by-side with cronie." |
109 | echo -e "Please uninstall sys-apps/fcron first!" |
110 | echo -e ${COLDEFAULT} |
111 | die "sys-apps/fcron found!" |
112 | fi |
113 | } |
114 | |
115 | postinstall() |
116 | { |
117 | mstartunit cronie.service |
118 | |
119 | echo |
120 | echo "To activate /etc/cron.{hourly|daily|weekly|montly} please run: " |
121 | echo "crontab /etc/crontab" |
122 | echo |
123 | echo "To run cronie at system boot please run: " |
124 | echo "systemctl enable cronie.service" |
125 | echo |
126 | echo "!!! That will replace root's current crontab !!!" |
127 | echo |
128 | } |
129 | |
130 | postremove() |
131 | { |
132 | mstopunit cronie.service |
133 | } |