Ticket #11551: Portfile.2

File Portfile.2, 2.7 KB (added by macports@…, 18 years ago)

Revised 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 ${worksrcpath} && echo 'cc -Xlinker -x' >src/conf-ld"
30    reinplace "s| -static||g" ${worksrcpath}/src/Makefile
31    # Force use of select() rather than broken poll()
32    file copy -force ${worksrcpath}/src/iopause.h1 ${worksrcpath}/src/iopause.h2
33}
34post-build      {
35    system "cd ${workpath}/${worksrcdir}/man && gzip *.8"
36}
37
38startupitem.create      yes
39startupitem.name        ${name}
40startupitem.executable  sh -c "PATH=\"${prefix}/sbin:${prefix}/bin:\$PATH\" exec '${prefix}/sbin/runsvdir' '${prefix}/var/service' 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'"
41
42destroot        {
43        xinstall -m 755 -s -W ${worksrcpath}/command runsv runsvdir sv svlogd utmpset chpst runsvchdir \
44                ${destroot}${prefix}/sbin
45        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
46        xinstall -m 644 -W ${worksrcpath}/doc benefits.html chpst.8.html dependencies.html \
47                 faq.html index.html install.html replaceinit.html runit-init.8.html runit.8.html \
48                 runlevels.html runscripts.html runsv.8.html runsvchdir.8.html runsvdir.8.html sv.8.html \
49                 svlogd.8.html upgrade.html usedietlibc.html useinit.html utmpset.8.html \
50                ${destroot}${prefix}/share/doc/${name}
51
52        xinstall -m 755 -d ${destroot}${prefix}/share/man/man8
53        xinstall -m 644 -W ${worksrcpath}/man chpst.8.gz runit-init.8.gz runit.8.gz runsv.8.gz \
54                 runsvchdir.8.gz runsvdir.8.gz sv.8.gz svlogd.8.gz utmpset.8.gz \
55                ${destroot}${prefix}/share/man/man8
56}
57
58post-install    {
59        ui_msg "\nCreate ${prefix}/var/service, then add service subdirectories as required; \
60                the startup item will then supervise these services by default."
61}