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