1 | # $Id: $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name runit |
---|
6 | version 1.7.2 |
---|
7 | revision 1 |
---|
8 | categories sysutils |
---|
9 | platforms darwin |
---|
10 | maintainers macports@sanityinc.com |
---|
11 | description collection of tools for managing UNIX services |
---|
12 | long_description runit is a cross-platform Unix init scheme with service supervision, \ |
---|
13 | fashioned after daemontools. It includes tools for starting, \ |
---|
14 | restarting, stopping, monitoring and logging any services \ |
---|
15 | that you might wish to run. |
---|
16 | |
---|
17 | homepage http://smarden.org/runit/ |
---|
18 | master_sites http://smarden.org/runit/ |
---|
19 | checksums ${distname}.tar.gz md5 35448e97188544914f298c88871ab984 |
---|
20 | |
---|
21 | worksrcdir admin/${worksrcdir} |
---|
22 | |
---|
23 | use_configure no |
---|
24 | |
---|
25 | build.cmd package/compile |
---|
26 | build.target |
---|
27 | |
---|
28 | pre-build { |
---|
29 | system "cd ${workpath}/${worksrcdir} && echo 'cc -Xlinker -x' >src/conf-ld" |
---|
30 | system "cd ${workpath}/${worksrcdir} && cp src/Makefile src/Makefile.old" |
---|
31 | system "cd ${workpath}/${worksrcdir} && mkdir -p compile" |
---|
32 | # Force use of select() rather than broken poll() |
---|
33 | system "cd ${workpath}/${worksrcdir} && cp src/iopause.h1 src/iopause.h2" |
---|
34 | system "cd ${workpath}/${worksrcdir} && sed -e 's/ -static//' <src/Makefile.old >src/Makefile" |
---|
35 | } |
---|
36 | post-build { |
---|
37 | system "cd ${workpath}/${worksrcdir}/man && gzip *.8" |
---|
38 | } |
---|
39 | |
---|
40 | startupitem.create yes |
---|
41 | startupitem.name ${name} |
---|
42 | startupitem.executable sh -c "PATH='${prefix}/sbin:${prefix}/bin:/usr/sbin:/usr/bin:/bin' exec '${prefix}/sbin/runsvdir' '${prefix}/var/service' 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'" |
---|
43 | |
---|
44 | destroot { |
---|
45 | xinstall -m 755 -s -W ${worksrcpath}/command runsv runsvdir sv svlogd utmpset chpst runsvchdir \ |
---|
46 | ${destroot}${prefix}/sbin |
---|
47 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
48 | xinstall -m 644 -W ${worksrcpath}/doc benefits.html chpst.8.html dependencies.html \ |
---|
49 | faq.html index.html install.html replaceinit.html runit-init.8.html runit.8.html \ |
---|
50 | runlevels.html runscripts.html runsv.8.html runsvchdir.8.html runsvdir.8.html sv.8.html \ |
---|
51 | svlogd.8.html upgrade.html usedietlibc.html useinit.html utmpset.8.html \ |
---|
52 | ${destroot}${prefix}/share/doc/${name} |
---|
53 | |
---|
54 | xinstall -m 755 -d ${destroot}${prefix}/share/man/man8 |
---|
55 | xinstall -m 644 -W ${worksrcpath}/man chpst.8.gz runit-init.8.gz runit.8.gz runsv.8.gz \ |
---|
56 | runsvchdir.8.gz runsvdir.8.gz sv.8.gz svlogd.8.gz utmpset.8.gz \ |
---|
57 | ${destroot}${prefix}/share/man/man8 |
---|
58 | } |
---|
59 | |
---|
60 | post-install { |
---|
61 | ui_msg "\nCreate ${prefix}/var/service, then add service subdirectories as required; \ |
---|
62 | the startup item will then supervise these services by default." |
---|
63 | } |
---|