On Apr 23, 2011, at 13:59, [email protected] wrote: > Revision: 78104 > http://trac.macports.org/changeset/78104 > Author: [email protected] > Date: 2011-04-23 11:59:22 -0700 (Sat, 23 Apr 2011) > Log Message: > ----------- > new port vnstat, network traffic monitor
> --- trunk/dports/net/vnstat/Portfile (rev 0) > +++ trunk/dports/net/vnstat/Portfile 2011-04-23 18:59:22 UTC (rev 78104) > @@ -0,0 +1,51 @@ Don't forget to put the standard modeline here. > +# $Id: Portfile 77708 2011-04-09 23:21:20Z [email protected] $ > +PortSystem 1.0 > + > +name vnstat > +version 1.10 > +categories net > +platforms darwin > +maintainers and.damore openmaintainer > +description console-based network traffic monitor > +long_description \ > + vnStat is a console-based network traffic monitor for Linux and BSD > that keeps \ > + a log of network traffic for the selected interface(s), it uses the > network \ > + interface statistics provided by the kernel as information source. > This means \ > + that vnStat won't actually be sniffing any traffic and also ensures > light use \ > + of system resources. > + > +homepage http://wsapi.luaforge.net/ > +master_sites http://humdi.net/${name} > + > +checksums md5 95421d968689130590348ceb80ff74a8 \ > + sha1 813177fb55296deaf5059bb111885616f4d8a86f \ > + rmd160 1fddc4343cb3206cce42516f7ff61024c65eed3f > + > +use_configure no Because you're not using a standard configure script, you need to manually handle UsingTheRightCompiler, build_arch and a universal variant. > +destroot.target bsdinstall > +depends_lib port:gd2 > + > +patchfiles patch-makefile.diff > + > +#post-patch { > +# reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile > +# reinplace "s|DESTDIR)/etc/vnstat|DESTDIR)${prefix}/etc/vnstat|g" > ${worksrcpath}/Makefile > +#} The patchfile hardcodes /opt/local; please arrange to use ${prefix} instead. > +post-destroot { > + xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} > + xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name} > + > + xinstall -m 644 \ > + ${worksrcpath}/CHANGES \ > + ${worksrcpath}/COPYING \ > + ${worksrcpath}/FAQ \ > + ${worksrcpath}/INSTALL \ > + ${worksrcpath}/INSTALL_BSD \ > + ${worksrcpath}/README \ > + ${destroot}${prefix}/share/doc/${name} You can simplify this using xinstall's -W argument. > + file copy {*}[glob ${worksrcpath}/examples/*] > ${destroot}${prefix}/share/examples/${name} What's this "{*}" doing? _______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
