source: trunk/dports/net/nefu/Portfile

Last change on this file was 146517, checked in by raimue@…, 17 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    nefu
6version                 1.4.0
7revision        2
8categories              net
9license                 BSD
10maintainers             nomaintainer
11description             A network monitoring daemon.
12long_description        nefu monitors network services and reports outages. \
13                                        Working from a description of the network \
14                                        topography, nefu's algorithm prevents "false alarms" \
15                                        in the event of a network outage due to a dependency \
16                                        failure.
17homepage                http://rsug.itd.umich.edu/software/nefu/
18master_sites    ${homepage}files/
19checksums               md5 f0953b21cdb5eb327e40d4b215110b71 \
20                                sha1 799d5573ab6d30f32cdc36bfee09a04de0f33bf8 \
21                                rmd160 712b637b3c9126c2a218f5ec0eb74497f7e6ea59
22extract.suffix  .tgz
23platforms               darwin
24
25depends_build   bin:bison:bison
26depends_lib             path:lib/libssl.dylib:openssl port:zlib
27
28patchfiles              patch-Makefile.in.diff \
29                                patch-aclocal.m4.diff \
30                                patch-libsnet-aclocal.m4.diff \
31                                patch-configure.ac.diff
32
33use_autoconf    yes
34# This really should be in a post-autoconf hook, but we don't have one yet.
35pre-configure {
36    system "cd ${worksrcpath}/libsnet && autoconf"
37}
38configure.args  --mandir=${prefix}/share/man \
39                                --with-html=${prefix}/share/${name}/public_html \
40                                --with-shelltests=${prefix}/share/${name}/shelltests
41
42use_parallel_build      no
43build.args              DEFS="-DBIND_8_COMPAT -DLDAP_DEPRECATED"
44post-build {
45        system "cd ${worksrcpath}/TDK && ${build.cmd}"
46}
47
48pre-destroot {
49        addgroup nefu
50        set gid [existsgroup nefu]
51        adduser nefu gid=${gid} realname=Nefu\ Monitor home=${prefix}/share/${name}
52        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/public_html
53}
54destroot.keepdirs       ${destroot}${prefix}/share/${name}/shelltests
55post-destroot {
56        # nefu conf file
57        xinstall -d -m 0755 ${destroot}${prefix}/etc
58        xinstall -m 0644 ${filespath}/nefu.conf.in \
59                ${destroot}${prefix}/etc/nefu.conf-dist
60        set hostname [exec hostname]
61        reinplace "s%__HOSTNAME%${hostname}%" \
62                ${destroot}${prefix}/etc/nefu.conf-dist
63
64        # nefu start/stop rc script (if non-Darwin)
65        if {${os.platform} ne "darwin"} {
66                xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
67                xinstall -m 0755 ${filespath}/nefu.sh.in \
68                        ${destroot}${prefix}/etc/rc.d/nefu.sh
69                reinplace "s%__PREFIX%${prefix}%" \
70                        ${destroot}${prefix}/etc/rc.d/nefu.sh
71        }
72
73        # nefu documentation
74        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
75        xinstall -m 0644 -W ${worksrcpath} README ${destroot}${prefix}/share/doc/${name}
76
77        # nefu TDK
78        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/TDK
79        xinstall -m 0755 -W ${worksrcpath} TDK/tdk \
80                ${destroot}${prefix}/share/doc/${name}/TDK
81        xinstall -m 0644 -W ${worksrcpath} TDK/README TDK/README.C TDK/README.SH \
82                ${destroot}${prefix}/share/doc/${name}/TDK
83        reinplace "s%nefu-src/TDK/shelltests%./shelltests%" \
84                ${destroot}${prefix}/share/doc/${name}/TDK/README.SH
85        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/TDK/shelltests
86        xinstall -m 0755 -W ${worksrcpath} TDK/shelltests/environ.sh \
87                ${destroot}${prefix}/share/doc/${name}/TDK/shelltests
88
89        # fix ownership
90        if {$env(USER) == "root"} {
91                system "chown -R nefu ${destroot}${prefix}/share/${name}"
92                system "chgrp -R nefu ${destroot}${prefix}/share/${name}"
93        }
94}
95
96pre-install {
97        addgroup nefu
98        set gid [existsgroup nefu]
99        adduser nefu gid=${gid} realname=Nefu\ Monitor home=${prefix}/share/${name}
100}
101
102post-activate {
103        # Make sure initial conf file is present and setup correctly
104        if {![file exists ${prefix}/etc/nefu.conf]} {
105                xinstall -m 0644 ${prefix}/etc/nefu.conf-dist ${prefix}/etc/nefu.conf
106        }
107}
108
109platform darwin {
110        patchfiles-append       patch-libtest-ping.c.diff
111        post-destroot {
112                system "ln -s public_html ${destroot}${prefix}/share/${name}/Sites"
113        }
114
115        startupitem.create                      yes
116        startupitem.name                        Nefu
117        startupitem.start                       "${prefix}/bin/nefu -f ${prefix}/etc/nefu.conf -H"
118        startupitem.stop                        "/usr/bin/killall -SIGUSR1 nefu 2>/dev/null"
119}
Note: See TracBrowser for help on using the repository browser.