[139348] trunk/dports/net/vnstat/Portfile

khindenburg at macports.org khindenburg at macports.org
Thu Aug 13 20:12:51 PDT 2015


Revision: 139348
          https://trac.macports.org/changeset/139348
Author:   khindenburg at macports.org
Date:     2015-08-13 20:12:51 -0700 (Thu, 13 Aug 2015)
Log Message:
-----------
vnstat: upgrade to 1.14; adjust install conf file; new maintainer #48497

Modified Paths:
--------------
    trunk/dports/net/vnstat/Portfile

Modified: trunk/dports/net/vnstat/Portfile
===================================================================
--- trunk/dports/net/vnstat/Portfile	2015-08-14 00:58:13 UTC (rev 139347)
+++ trunk/dports/net/vnstat/Portfile	2015-08-14 03:12:51 UTC (rev 139348)
@@ -4,11 +4,10 @@
 PortSystem 1.0
 
 name                vnstat
-version             1.11
-revision            2
+version             1.14
 categories          net
 platforms           darwin
-maintainers         nomaintainer
+maintainers         gmail.com:youvegotmoxie
 license             GPL-2
 description         console-based network traffic monitor
 long_description    \
@@ -21,10 +20,10 @@
 homepage            http://humdi.net/vnstat/
 depends_lib         port:gd2
 master_sites        http://humdi.net/${name}
-checksums           md5     a5a113f9176cd61fb954f2ba297f5fdb \
-                    sha1    92494f38a752dcf60053af2a6d8977737da7e616 \
-                    rmd160  c7a8602c6ed86c674b14b2b8708e97f5999fb0e5
 
+checksums           rmd160  9cbe5d4f11d757ae19db4b38155de63a8caf6164 \
+                    sha256  f8462a47d85d0890493dc9eaeafbc725ae631aa5b103fb7f8af4ddb2314e8386
+
 post-patch {
     # fix Makefile
     reinplace "s|/usr/local|${prefix}|g"                 ${worksrcpath}/Makefile
@@ -70,5 +69,25 @@
 
     eval file copy [glob ${worksrcpath}/examples/*] \
         ${destroot}${prefix}/share/examples/${name}
+
+    # Rename conf file so we don't clobber a user's real conf file on upgrade.
+    move ${destroot}${prefix}/etc/vnstat.conf ${destroot}${prefix}/etc/vnstat.conf.sample
 }
 
+notes "
+A configuration file has been installed to ${prefix}/etc/vnstat.conf
+"
+
+pre-activate {
+    if {[file exists ${prefix}/etc/vnstat.conf]} {
+        # Clear the notes if there is already a conf file
+        notes
+    }
+}
+
+post-activate {
+    if {![file exists ${prefix}/etc/vnstat.conf]} {
+        copy ${prefix}/etc/vnstat.conf.sample \
+            ${prefix}/etc/vnstat.conf
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150813/94a3d09e/attachment.html>


More information about the macports-changes mailing list