source: trunk/dports/net/vnstat/Portfile @ 109415

Last change on this file since 109415 was 109415, checked in by ryandesign@…, 7 years ago

revbump ports that link with libgd in their default configuration to rebuild with gd2 @2.1.0 (libgd.3.dylib) (#39550)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 109415 2013-08-15 06:58:50Z ryandesign@macports.org $
2PortSystem 1.0
3
4name                vnstat
5version             1.11
6revision            2
7categories          net
8platforms           darwin
9maintainers         and.damore openmaintainer
10license             GPL-2
11description         console-based network traffic monitor
12long_description    \
13        vnStat is a console-based network traffic monitor for Linux and BSD that keeps \
14        a log of network traffic for the selected interface(s), it uses the network \
15        interface statistics provided by the kernel as information source.  This means \
16        that vnStat won't actually be sniffing any traffic and also ensures light use \
17        of system resources.
18
19homepage            http://humdi.net/vnstat/
20depends_lib         port:gd2       
21master_sites        http://humdi.net/${name}
22checksums           md5     a5a113f9176cd61fb954f2ba297f5fdb \
23                    sha1    92494f38a752dcf60053af2a6d8977737da7e616 \
24                    rmd160  c7a8602c6ed86c674b14b2b8708e97f5999fb0e5
25
26post-patch {
27    # fix Makefile
28    reinplace "s|/usr/local|${prefix}|g"                 ${worksrcpath}/Makefile
29    reinplace "s|${prefix}/man|${prefix}/share/man|g"    ${worksrcpath}/Makefile
30    reinplace "s|(DESTDIR)/etc|(DESTDIR)${prefix}/etc|g" ${worksrcpath}/Makefile
31    reinplace "s|(DESTDIR)/var|(DESTDIR)${prefix}/var|g" ${worksrcpath}/Makefile
32   
33    # fix occurrences of /var/db references in other files
34    reinplace "s|/var|${prefix}/var|g"  ${worksrcpath}/src/common.h \
35                                        ${worksrcpath}/cfg/vnstat.conf \
36                                        ${worksrcpath}/man/vnstat.1 \
37                                        ${worksrcpath}/man/vnstatd.1 \
38                                        ${worksrcpath}/man/vnstati.1
39    reinplace "s|/var/lib|/var/db|g"    ${worksrcpath}/man/vnstat.1 \
40                                        ${worksrcpath}/man/vnstatd.1 \
41                                        ${worksrcpath}/man/vnstati.1
42   
43    # fix occurrences of /etc/db references in other files
44    reinplace "s|/etc|${prefix}/etc|g"  ${worksrcpath}/man/vnstat.1 \
45                                        ${worksrcpath}/man/vnstat.conf.5 \
46                                        ${worksrcpath}/man/vnstatd.1 \
47                                        ${worksrcpath}/man/vnstati.1 \
48                                        ${worksrcpath}/src/cfg.c
49}
50
51use_configure       no
52variant universal   {}
53
54build.args-append   CC="${configure.cc} [get_canonical_archflags]" \
55                    CPP=${configure.cpp} \
56                    CFLAGS="-I${prefix}/include" \
57                    LDFLAGS="-L${prefix}/lib"
58
59destroot.target     bsdinstall
60destroot.keepdirs   ${destroot}${prefix}/var/db/vnstat
61post-destroot {
62    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
63    xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
64   
65    xinstall -m 644 -W ${worksrcpath} \
66        CHANGES COPYING FAQ INSTALL INSTALL_BSD README \
67        ${destroot}${prefix}/share/doc/${name}
68
69    eval file copy [glob ${worksrcpath}/examples/*] \
70        ${destroot}${prefix}/share/examples/${name}
71}
72
Note: See TracBrowser for help on using the repository browser.