Ticket #11551: Portfile

File Portfile, 2.9 KB (added by steve@…, 18 years ago)

sysutils/runit/Portfile

Line 
1# $Id: $
2
3PortSystem 1.0
4
5name                    runit
6version                 1.7.2
7revision                1
8categories              sysutils
9platforms               darwin
10maintainers             macports@sanityinc.com
11description             collection of tools for managing UNIX services
12long_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
17homepage                http://smarden.org/runit/
18master_sites            http://smarden.org/runit/
19checksums               ${distname}.tar.gz md5 35448e97188544914f298c88871ab984
20
21worksrcdir              admin/${worksrcdir}
22
23use_configure   no
24
25build.cmd               package/compile
26build.target
27
28pre-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}
36post-build      {
37        system "cd ${workpath}/${worksrcdir}/man && gzip *.8"
38}
39
40startupitem.create      yes
41startupitem.name        ${name}
42startupitem.executable  sh -c "PATH='${prefix}/sbin:${prefix}/bin:/usr/sbin:/usr/bin:/bin' exec '${prefix}/sbin/runsvdir' '${prefix}/var/service' 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'"
43
44destroot        {
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
60post-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}