[110826] trunk/dports/net

larryv at macports.org larryv at macports.org
Fri Sep 6 21:12:13 PDT 2013


Revision: 110826
          https://trac.macports.org/changeset/110826
Author:   larryv at macports.org
Date:     2013-09-06 21:12:13 -0700 (Fri, 06 Sep 2013)
Log Message:
-----------
dibbler: New port (#39602).

Added Paths:
-----------
    trunk/dports/net/dibbler/
    trunk/dports/net/dibbler/Portfile
    trunk/dports/net/dibbler/files/
    trunk/dports/net/dibbler/files/0-enable-prefix.patch
    trunk/dports/net/dibbler/files/1-correct-man-pages.patch

Added: trunk/dports/net/dibbler/Portfile
===================================================================
--- trunk/dports/net/dibbler/Portfile	                        (rev 0)
+++ trunk/dports/net/dibbler/Portfile	2013-09-07 04:12:13 UTC (rev 110826)
@@ -0,0 +1,77 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                dibbler
+version             1.0.0RC1
+categories          net
+platforms           darwin
+license             GPL-2
+maintainers         free.fr:fclaire
+
+installs_libs       no
+
+description         A portable DHCPv6
+long_description    Dibbler is a portable DHCPv6 implementation. It \
+                    supports stateful (i.e. IPv6 address granting and \
+                    IPv6 prefix delegation) as well as stateless (i.e. \
+                    option granting) autoconfiguration for IPv6.
+homepage            http://klub.com.pl/dhcpv6/
+
+master_sites        http://klub.com.pl/dhcpv6/dibbler/
+checksums           rmd160  5f8a70f46e9497b9cceab6cf04a2e05259ab075e \
+                    sha256  4d29b5436cd97e5e5c7afb2278ec608bf5adb9c451e9628066f2e943164d3f74
+
+patch.pre_args      -p1
+patchfiles          0-enable-prefix.patch \
+                    1-correct-man-pages.patch
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|g" \
+        Misc/Portable.h \
+        Port-bsd/lowlevel-bsd.c \
+        doc/examples/client.conf \
+        doc/examples/server.conf \
+        doc/man/dibbler-client.8 \
+        doc/man/dibbler-relay.8 \
+        doc/man/dibbler-server.8 \
+        scripts/notify-scripts/server-notify.sh
+}
+
+# TODO: Fix libc++ build.
+if {[info exists configure.cxx_stdlib]} {
+    configure.cxx_stdlib libstdc++
+}
+
+post-destroot {
+    xinstall -d -m 0755 ${destroot}${prefix}/share/examples
+    move ${destroot}${prefix}/share/doc/dibbler/examples \
+        ${destroot}${prefix}/share/examples/${name}
+
+    xinstall -d -m 0755 \
+        ${destroot}${prefix}/etc/dibbler \
+        ${destroot}${prefix}/var/lib/dibbler \
+        ${destroot}${prefix}/var/log/dibbler
+    foreach conf {client.conf relay.conf server.conf} {
+        ln -s ../../../share/examples/${name}/${conf} \
+            ${destroot}${prefix}/etc/dibbler/${conf}.sample
+    }
+}
+destroot.keepdirs       ${destroot}${prefix}/var/lib/dibbler \
+                        ${destroot}${prefix}/var/log/dibbler
+
+startupitem.create      yes
+startupitem.executable  ${prefix}/sbin/dibbler-server run
+
+livecheck.type          regex
+livecheck.url           ${master_sites}
+livecheck.regex         ${name}-(\[\[\:alnum:\].\]+)\\.tar\\.gz
+
+notes "
+Before using Dibbler, make copies of the appropriate sample\
+configuration files and edit as necessary.
+
+    sudo ditto ${prefix}/etc/${name}/client.conf{.sample,}
+    sudo ditto ${prefix}/etc/${name}/server.conf{.sample,}
+    sudo ditto ${prefix}/etc/${name}/relay.conf{.sample,}
+"


Property changes on: trunk/dports/net/dibbler/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/net/dibbler/files/0-enable-prefix.patch
===================================================================
--- trunk/dports/net/dibbler/files/0-enable-prefix.patch	                        (rev 0)
+++ trunk/dports/net/dibbler/files/0-enable-prefix.patch	2013-09-07 04:12:13 UTC (rev 110826)
@@ -0,0 +1,142 @@
+diff --git a/Misc/Portable.h b/Misc/Portable.h
+index 12cae0a..d1721dd 100644
+--- a/Misc/Portable.h
++++ b/Misc/Portable.h
+@@ -166,22 +166,22 @@ struct link_state_notify_t
+ #endif
+ 
+ #if defined(LINUX) || defined(BSD) || defined(SUNOS)
+-#define WORKDIR            "/var/lib/dibbler"
++#define WORKDIR            "__PREFIX__/var/lib/dibbler"
+ #define DEFAULT_SCRIPT     ""
+-#define CLNTCONF_FILE      "/etc/dibbler/client.conf"
+-#define SRVCONF_FILE       "/etc/dibbler/server.conf"
+-#define RELCONF_FILE       "/etc/dibbler/relay.conf"
++#define CLNTCONF_FILE      "__PREFIX__/etc/dibbler/client.conf"
++#define SRVCONF_FILE       "__PREFIX__/etc/dibbler/server.conf"
++#define RELCONF_FILE       "__PREFIX__/etc/dibbler/relay.conf"
+ #define RESOLVCONF_FILE    "/etc/resolv.conf"
+ #define NTPCONF_FILE       "/etc/ntp.conf"
+-#define RADVD_FILE         "/etc/dibbler/radvd.conf"
+-#define CLNTPID_FILE       "/var/lib/dibbler/client.pid"
+-#define SRVPID_FILE        "/var/lib/dibbler/server.pid"
+-#define RELPID_FILE        "/var/lib/dibbler/relay.pid"
+-#define CLNTLOG_FILE       "/var/log/dibbler/dibbler-client.log"
+-#define SRVLOG_FILE        "/var/log/dibbler/dibbler-server.log"
+-#define RELLOG_FILE        "/var/log/dibbler/dibbler-relay.log"
+-#define CLNT_AAASPI_FILE   "/var/lib/dibbler/AAA/AAA-SPI"
+-#define SRV_KEYMAP_FILE    "/var/lib/dibbler/AAA/keys-mapping"
++#define RADVD_FILE         "__PREFIX__/etc/dibbler/radvd.conf"
++#define CLNTPID_FILE       "__PREFIX__/var/lib/dibbler/client.pid"
++#define SRVPID_FILE        "__PREFIX__/var/lib/dibbler/server.pid"
++#define RELPID_FILE        "__PREFIX__/var/lib/dibbler/relay.pid"
++#define CLNTLOG_FILE       "__PREFIX__/var/log/dibbler/dibbler-client.log"
++#define SRVLOG_FILE        "__PREFIX__/var/log/dibbler/dibbler-server.log"
++#define RELLOG_FILE        "__PREFIX__/var/log/dibbler/dibbler-relay.log"
++#define CLNT_AAASPI_FILE   "__PREFIX__/var/lib/dibbler/AAA/AAA-SPI"
++#define SRV_KEYMAP_FILE    "__PREFIX__/var/lib/dibbler/AAA/keys-mapping"
+ #define NULLFILE           "/dev/null"
+ 
+ /* those defines were initially used on Linux only, but hopefully 
+diff --git a/Port-bsd/lowlevel-bsd.c b/Port-bsd/lowlevel-bsd.c
+index ede2626..04056a1 100644
+--- a/Port-bsd/lowlevel-bsd.c
++++ b/Port-bsd/lowlevel-bsd.c
+@@ -488,10 +488,10 @@ int is_addr_tentative(char * ifacename, int iface, char * addr) {
+ char * getAAAKeyFilename(uint32_t SPI) {
+     static char filename[1024];
+     if (SPI != 0)
+-        snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-",
++        snprintf(filename, 1024, "%s%s%x", WORKDIR "/AAA/", "AAA-key-",
+             SPI);
+     else
+-        strcpy(filename, "/var/lib/dibbler/AAA/AAA-key");
++        strcpy(filename, WORKDIR "/AAA/AAA-key");
+     return filename;
+ }
+ 
+diff --git a/doc/examples/client.conf b/doc/examples/client.conf
+index 86370d9..d54445a 100644
+--- a/doc/examples/client.conf
++++ b/doc/examples/client.conf
+@@ -21,7 +21,7 @@ log-mode short
+ log-level 7
+ 
+ # Uncomment this line to run script every time response is received
+-# script "/var/lib/dibbler/client-notify.sh"
++# script "__PREFIX__/var/lib/dibbler/client-notify.sh"
+ 
+ 
+ # Current Dibbler release adds obtained addresses with /64 prefix. Although
+diff --git a/doc/examples/server.conf b/doc/examples/server.conf
+index 402865c..6862a5e 100644
+--- a/doc/examples/server.conf
++++ b/doc/examples/server.conf
+@@ -12,7 +12,7 @@ log-level 8
+ log-mode short
+ 
+ # Uncomment this line to call script every time a response is sent
+-#script "/var/lib/dibbler/server-notify.sh"
++#script "__PREFIX__/var/lib/dibbler/server-notify.sh"
+ 
+ # set preference of this server to 0 (higher = more prefered)
+ preference 0
+diff --git a/doc/man/dibbler-client.8 b/doc/man/dibbler-client.8
+index 953e701..fcd4793 100644
+--- a/doc/man/dibbler-client.8
++++ b/doc/man/dibbler-client.8
+@@ -76,8 +76,8 @@ iface eth0
+ More examples can be found in the User's Guide.
+ 
+ .SH FILES
+-All files are created in the /var/lib/dibbler directory. Dibbler
+-client reads /var/lib/dibbler/client.conf file. During operation,
++All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler
++client reads __PREFIX__/var/lib/dibbler/client.conf file. During operation,
+ Dibbler saves various file in that directory. After reception of the
+ DNS servers or domain informations, they are added to the
+ /etc/resolv.conf file. After shutdown, that information is removed
+diff --git a/doc/man/dibbler-relay.8 b/doc/man/dibbler-relay.8
+index 6767e02..07283ea 100644
+--- a/doc/man/dibbler-relay.8
++++ b/doc/man/dibbler-relay.8
+@@ -93,9 +93,9 @@ iface eth3 {
+ .fi
+ 
+ .SH FILES
+-All files are created in the /var/lib/dibbler directory. During operation,
++All files are created in the __PREFIX__/var/lib/dibbler directory. During operation,
+ Dibbler saves various file in that directory. Dibbler relay reads
+-/etc/dibbler/relay.conf file. Log file is named client.log.
++__PREFIX__/etc/dibbler/relay.conf file. Log file is named client.log.
+ 
+ .SH STANDARDS
+ This implementation aims at conformance to the following standards:
+diff --git a/doc/man/dibbler-server.8 b/doc/man/dibbler-server.8
+index bca5dad..9494c42 100644
+--- a/doc/man/dibbler-server.8
++++ b/doc/man/dibbler-server.8
+@@ -79,8 +79,8 @@ iface eth0 {
+ More examples can be found in the User's Guide.
+ 
+ .SH FILES
+-All files are created in the /var/lib/dibbler directory. Dibbler
+-server reads /var/lib/dibbler/server.conf file. During operation,
++All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler
++server reads __PREFIX__/var/lib/dibbler/server.conf file. During operation,
+ Dibbler saves various file in that directory.  Log file is named client.log.
+ 
+ .SH STANDARDS
+diff --git a/scripts/notify-scripts/server-notify.sh b/scripts/notify-scripts/server-notify.sh
+index 3b4adbf..5661c6e 100755
+--- a/scripts/notify-scripts/server-notify.sh
++++ b/scripts/notify-scripts/server-notify.sh
+@@ -6,7 +6,7 @@
+ #
+ # Many parameters will be passed as environment variables
+ 
+-LOGFILE=/var/lib/dibbler/server-notify.log
++LOGFILE=__PREFIX__/var/lib/dibbler/server-notify.log
+ 
+ echo "---$1--------" >> $LOGFILE
+ date >> $LOGFILE

Added: trunk/dports/net/dibbler/files/1-correct-man-pages.patch
===================================================================
--- trunk/dports/net/dibbler/files/1-correct-man-pages.patch	                        (rev 0)
+++ trunk/dports/net/dibbler/files/1-correct-man-pages.patch	2013-09-07 04:12:13 UTC (rev 110826)
@@ -0,0 +1,26 @@
+diff --git a/doc/man/dibbler-client.8 b/doc/man/dibbler-client.8
+index fcd4793..9003b46 100644
+--- a/doc/man/dibbler-client.8
++++ b/doc/man/dibbler-client.8
+@@ -77,7 +77,7 @@ More examples can be found in the User's Guide.
+ 
+ .SH FILES
+ All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler
+-client reads __PREFIX__/var/lib/dibbler/client.conf file. During operation,
++client reads __PREFIX__/etc/dibbler/client.conf file. During operation,
+ Dibbler saves various file in that directory. After reception of the
+ DNS servers or domain informations, they are added to the
+ /etc/resolv.conf file. After shutdown, that information is removed
+diff --git a/doc/man/dibbler-server.8 b/doc/man/dibbler-server.8
+index 9494c42..e9fd15b 100644
+--- a/doc/man/dibbler-server.8
++++ b/doc/man/dibbler-server.8
+@@ -80,7 +80,7 @@ More examples can be found in the User's Guide.
+ 
+ .SH FILES
+ All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler
+-server reads __PREFIX__/var/lib/dibbler/server.conf file. During operation,
++server reads __PREFIX__/etc/dibbler/server.conf file. During operation,
+ Dibbler saves various file in that directory.  Log file is named client.log.
+ 
+ .SH STANDARDS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130906/4ff13901/attachment.html>


More information about the macports-changes mailing list