Ticket #12764: Portfile

File Portfile, 2.8 KB (added by macports@…, 17 years ago)
Line 
1# $Id: Portfile 24402 2007-04-24 03:20:46Z jann@macports.org $
2
3PortSystem 1.0
4
5name            runit
6version         1.8.0
7categories      sysutils
8platforms       darwin
9maintainers     macports@sanityinc.com
10description     collection of tools for managing UNIX services
11long_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
16homepage        http://smarden.org/runit/
17master_sites    http://smarden.org/runit/
18checksums       ${distname}.tar.gz md5 46549303a336bee8f627bfb399d44085
19worksrcdir      admin/${worksrcdir}
20use_configure   no
21
22build.cmd       package/compile
23build.target
24
25pre-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}
31post-build  {
32    system "cd ${workpath}/${worksrcdir}/man && gzip *.8"
33}
34
35startupitem.create      yes
36startupitem.name        ${name}
37startupitem.executable  sh -c "PATH=\"${prefix}/sbin:${prefix}/bin:\$PATH\" exec '${prefix}/sbin/runsvdir' '${prefix}/var/service' 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'"
38
39destroot    {
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
55post-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}