Magellan Linux

Annotation of /trunk/core/cronie/cronie-1.5.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29708 - (hide annotations) (download)
Tue Oct 10 07:12:44 2017 UTC (6 years, 7 months ago) by niro
File size: 2867 byte(s)
-updated UP2DATE uri
1 niro 28295 # $Id$
2    
3     PNAME="cronie"
4     PVER="1.5.1"
5     PBUILD="r1"
6    
7     PCAT="sys-apps"
8    
9     DESCRIPTION="A periodical command scheduler."
10 niro 29708 HOMEPAGE="https://github.com/cronie-crond/cronie"
11 niro 28295
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 niro 29708 UP2DATE="updatecmd https://github.com/cronie-crond/cronie/releases | highesttarball gz"
40 niro 28295
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     }