1 | PortSystem 1.0 |
---|
2 | name anacron |
---|
3 | version 2.3 |
---|
4 | categories sysutils |
---|
5 | maintainers bchesneau@mac.com |
---|
6 | description Schedules periodic jobs on systems that are not permanently up |
---|
7 | long_description Anacron is a periodic command scheduler. It executes commands \ |
---|
8 | at intervals specified in days. Unlike cron, it does not assume \ |
---|
9 | that the system is running continuously. |
---|
10 | homepage http://sourceforge.net/projects/anacron |
---|
11 | platforms darwin |
---|
12 | master_sites sourceforge |
---|
13 | checksums anacron-2.3.tar.gz md5 865cc1dfe1ed75c470d3e6de13763f03 |
---|
14 | |
---|
15 | depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
16 | |
---|
17 | patchfiles patch-Makefile patch-README patch-anacron.8 patch-anacrontab.5 |
---|
18 | |
---|
19 | use_configure no |
---|
20 | |
---|
21 | build.args PREFIX=${prefix} |
---|
22 | |
---|
23 | pre-patch { |
---|
24 | reinplace "s|__PREFIX|${prefix}|g" ${portpath}/files/patch-README |
---|
25 | reinplace "s|__PREFIX|${prefix}|g" ${portpath}/files/patch-anacron.8 |
---|
26 | reinplace "s|__PREFIX|${prefix}|g" ${portpath}/files/patch-anacrontab.5 |
---|
27 | } |
---|
28 | |
---|
29 | pre-build { |
---|
30 | system "cp ${portpath}/files/obstack.* ${workpath}/${worksrcdir}/" |
---|
31 | } |
---|
32 | |
---|
33 | destroot.target install PREFIX=${destroot}${prefix} |
---|
34 | |
---|
35 | |
---|
36 | pre-destroot { |
---|
37 | file mkdir ${destroot}${prefix}/etc/rc.d |
---|
38 | file mkdir ${destroot}${prefix}/etc/cron.daily |
---|
39 | file mkdir ${destroot}${prefix}/etc/cron.weekly |
---|
40 | file mkdir ${destroot}${prefix}/etc/cron.monthly |
---|
41 | file mkdir ${destroot}${prefix}/var/spool |
---|
42 | file mkdir ${destroot}${prefix}/var/spool/anacron |
---|
43 | |
---|
44 | system "touch ${destroot}${prefix}/etc/cron.daily/.turd" |
---|
45 | system "touch ${destroot}${prefix}/etc/cron.weekly/.turd" |
---|
46 | system "touch ${destroot}${prefix}/etc/cron.monthly/.turd" |
---|
47 | system "touch ${destroot}${prefix}/var/spool/anacron/.turd" |
---|
48 | } |
---|
49 | |
---|
50 | post-destroot { |
---|
51 | system "install -o root -m 755 -c ${portpath}/files/anacron.sh ${destroot}${prefix}/etc/rc.d" |
---|
52 | reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/rc.d/anacron.sh |
---|
53 | |
---|
54 | system "install -o root -m 755 -c ${portpath}/files/anacrontab.sample ${destroot}${prefix}/etc/anacrontab.sample" |
---|
55 | reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/etc/anacrontab.sample |
---|
56 | } |
---|