summaryrefslogtreecommitdiff
path: root/net/dhisd
diff options
context:
space:
mode:
authormef <mef@pkgsrc.org>2015-03-08 01:01:52 +0000
committermef <mef@pkgsrc.org>2015-03-08 01:01:52 +0000
commit794d3aa7d56e90b71221d689e7ec09c48f6b1965 (patch)
treeed2b7c526b6568b90830f120767e81feb885c80e /net/dhisd
parentf7356083edbbd5fee9e8b5efdaefb361608eb577 (diff)
downloadpkgsrc-794d3aa7d56e90b71221d689e7ec09c48f6b1965.tar.gz
(pkgsrc/Makefile)
- Add LICENSE= 2-clause-bsd - Drop PKG_DESTDIR_SUPPORT= - Add SUBST_CLASSES to edit Makefile for PREFIX - Add SUBST_CLASSES to edit dhisd.h and README for VARVASE and PREFIX - Add SPECIAL_PERMS to set mode 0700 owner root onto executables (pkgsrc/DESCR) - Add pointer to ${PREFIX}/share/doc/dhisd/README for info (pkgsrc/patches/patch-aa) - Removed (upstream) - Update 5.1 to 5.5 ----------------- On dhisd-5.5 The server no longer requires a 5.4 client to have rport=0 in order to reply to the sending port. This releases a small issue that broke 5.4 clients with servers <= 5.3. As of this version, if the client's version is 5.4 or higher, the server always replies to the sending UDP port and disregards rport. 5.5. clients however continue to fill in rport in order to be compatible with <= 5.3 servers. On dhisd-5.4: The modular architecture has been dropped and the modules and engines are no longer part of dhisd. Instead dhisd is again a DNS only updating daemon without engines; the extra functionality provided by previous engines can however still be replicated with OnCmd and OffCmd scripts on a per-host basis. The default configuration directory is now /usr/local/etc The default binaries directory is now /usr/local/sbin It is now possible to put all configuration parameters under a config file; the default is /usr/local/etc/dhisd.conf The pid file default location moved to /var/run/dhis/dhisd.pid The log file default location moved to /var/log/dhis/dhisd.log The server can now be bound to a specific IP address with either the BindAddr config option or the -b command line option. Multiple options have been added and are now possible with the command line (dhisd -h) and the config file. The server now binds to a UDP port (58800 by default) and sends UDP messages from that port; in previous versions dhisd sent UDP messages from a random port even though it listened on port 58000. In addition to the database text file (specified by the -d option or the DBFile config option), dhisd can now use a MySQL database instead to achieve the same purpose of the dhis.db file. See README and INSTALL for details. This version of the server is compatible with NAT friendly 5.4 clients. On dhisd-5.3: Corrected bug that caused improper handling of comment character (;) in the database file. On dhisd-5.2: Documentation Updates
Diffstat (limited to 'net/dhisd')
-rw-r--r--net/dhisd/DESCR2
-rw-r--r--net/dhisd/Makefile34
-rw-r--r--net/dhisd/PLIST5
-rw-r--r--net/dhisd/distinfo12
-rw-r--r--net/dhisd/patches/patch-README34
-rw-r--r--net/dhisd/patches/patch-aa19
-rw-r--r--net/dhisd/patches/patch-ab33
7 files changed, 78 insertions, 61 deletions
diff --git a/net/dhisd/DESCR b/net/dhisd/DESCR
index fe0d98e5ff1..33b52a1b417 100644
--- a/net/dhisd/DESCR
+++ b/net/dhisd/DESCR
@@ -18,3 +18,5 @@ again update the databases to an offline state.
Alternatively the server may receive an OFFLINE_REQ packet from
the client, in which case the DNS record is updated at once and
the online state dropped.
+
+see ${PREFIX}/share/doc/dhisd/README for info.
diff --git a/net/dhisd/Makefile b/net/dhisd/Makefile
index 3877912bb34..9c33768fb33 100644
--- a/net/dhisd/Makefile
+++ b/net/dhisd/Makefile
@@ -1,43 +1,51 @@
-# $NetBSD: Makefile,v 1.16 2014/09/23 17:57:04 jperkin Exp $
+# $NetBSD: Makefile,v 1.17 2015/03/08 01:01:52 mef Exp $
#
-DISTNAME= dhisd-5.1
-PKGREVISION= 1
+DISTNAME= dhisd-5.5
CATEGORIES= net
MASTER_SITES= ftp://ftp.dhis.org/pub/dhis/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.dhis.org/
COMMENT= DynDNS server
+LICENSE= 2-clause-bsd
LDFLAGS.SunOS+= -lsocket -lnsl
INSTALLATION_DIRS= bin share/examples/dhisd share/doc/dhisd
-PKG_DESTDIR_SUPPORT= destdir
+
+SUBST_CLASSES+= prefix
+SUBST_FILES.prefix= Makefile
+SUBST_STAGE.prefix= pre-configure
+SUBST_MESSAGE.prefix= Convert /usr/local to ${PREFIX}
+SUBST_SED.prefix= -e 's|/usr/local|${PREFIX}|;'
+SUBST_SED.prefix+= -e '/LFLAGS/s|${PREFIX}|${PREFIX}/lib -Wl,-rpath=${PREFIX}|;'
+
+SUBST_CLASSES+= varbase
+SUBST_FILES.varbase= dhisd.h README
+SUBST_STAGE.varbase= pre-configure
+SUBST_MESSAGE.varbase= Adapt VARBASE and PREFIX
+SUBST_VARS.varbase+= VARBASE PREFIX
+
+SPECIAL_PERMS+= bin/dhisd-genkeys ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700 \
+ bin/dhisd ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
do-install:
${INSTALL_DATA} \
- ${WRKSRC}/*db.sample \
+ ${WRKSRC}/*.sample \
${DESTDIR}${PREFIX}/share/examples/dhisd
${INSTALL_DATA} \
${WRKSRC}/CONTRIBUTORS \
${WRKSRC}/COPYRIGHT \
${WRKSRC}/INSTALL \
- ${WRKSRC}/MODULES \
${WRKSRC}/README \
${DESTDIR}${PREFIX}/share/doc/dhisd
${INSTALL_PROGRAM} \
${WRKSRC}/dhisd \
${DESTDIR}${PREFIX}/bin
${INSTALL_PROGRAM} \
- ${WRKSRC}/genkeys \
+ ${WRKSRC}/dhisgenkeys \
${DESTDIR}${PREFIX}/bin/dhisd-genkeys
- ${CHOWN} ${ROOT_USER} \
- ${DESTDIR}${PREFIX}/bin/dhisd-genkeys \
- ${DESTDIR}${PREFIX}/bin/dhisd
- ${CHMOD} 700 \
- ${DESTDIR}${PREFIX}/bin/dhisd-genkeys \
- ${DESTDIR}${PREFIX}/bin/dhisd
.include "../../devel/gmp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/dhisd/PLIST b/net/dhisd/PLIST
index 84153106158..9e73f12a9d6 100644
--- a/net/dhisd/PLIST
+++ b/net/dhisd/PLIST
@@ -1,10 +1,9 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:09:25 joerg Exp $
+@comment $NetBSD: PLIST,v 1.3 2015/03/08 01:01:52 mef Exp $
bin/dhisd
bin/dhisd-genkeys
share/doc/dhisd/CONTRIBUTORS
share/doc/dhisd/COPYRIGHT
share/doc/dhisd/INSTALL
-share/doc/dhisd/MODULES
share/doc/dhisd/README
share/examples/dhisd/dhis.db.sample
-share/examples/dhisd/services.db.sample
+share/examples/dhisd/dhisd.conf.sample
diff --git a/net/dhisd/distinfo b/net/dhisd/distinfo
index 36b593a79ca..0ca08fb99ce 100644
--- a/net/dhisd/distinfo
+++ b/net/dhisd/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2014/09/23 17:57:04 jperkin Exp $
+$NetBSD: distinfo,v 1.6 2015/03/08 01:01:52 mef Exp $
-SHA1 (dhisd-5.1.tar.gz) = e4e46bac4a07dcbe3d3e687fb4532fcd309de8ec
-RMD160 (dhisd-5.1.tar.gz) = 33b1ef166b468725d48abb9675564d2de1ff7b90
-Size (dhisd-5.1.tar.gz) = 27910 bytes
-SHA1 (patch-aa) = f72a3dd4fd4eba2fc4cf67dc6db37a28771214fa
-SHA1 (patch-ab) = 998607a6f718a276fb9584f94c0d3232295b0fbc
+SHA1 (dhisd-5.5.tar.gz) = 0bbd230d3947f3d21505db43db4dfd2281a04a86
+RMD160 (dhisd-5.5.tar.gz) = 48053e9627490fcd8a5b2de706ca4333a3e4be02
+Size (dhisd-5.5.tar.gz) = 26221 bytes
+SHA1 (patch-README) = b6ebc61ce419f89da44cfca00715bc65ef26a56d
+SHA1 (patch-ab) = f5a4315245cbf32aac88e183b3c2a86100ec3e08
diff --git a/net/dhisd/patches/patch-README b/net/dhisd/patches/patch-README
new file mode 100644
index 00000000000..3633f1f877d
--- /dev/null
+++ b/net/dhisd/patches/patch-README
@@ -0,0 +1,34 @@
+$NetBSD: patch-README,v 1.1 2015/03/08 01:01:52 mef Exp $
+
+@VARBASE@ and @PREFIX@ for README
+
+--- README.orig 2008-05-22 21:41:21.000000000 +0900
++++ README 2015-03-07 11:29:35.000000000 +0900
+@@ -128,7 +128,7 @@
+
+ -d <dbase_file> allows specifying a path for the database file
+
+- e.g. dhisd -d /usr/local/etc/dhis.db
++ e.g. dhisd -d @VARBASE@/db/dhis.db
+
+ If the special keyword "mysql" is given as a file,
+ and dhisd has been compiled with MySQL support,
+@@ -154,7 +154,7 @@
+ BindPort The UDP port to use, default is 58000
+ DBFile The location of the database file
+
+- See dhisd.conf.sample for an example.
++ See @PREFIX@/share/examples/dhisd/dhisd.conf.sample for an example.
+
+ MySQL Support
+ =============
+@@ -211,7 +211,8 @@
+ =============
+
+ For details on using a text file as a database instead of MySQL
+- (the traditional method) please see dhis.db.sample
++ (the traditional method) please see @PREFIX@/usr/pkg/share/examples/dhisd/dhis.db.sample
++ Please note the name is not dhisd.db but dhsi.db (no 'd').
+
+ Running dhisd as dhis user
+ ==========================
diff --git a/net/dhisd/patches/patch-aa b/net/dhisd/patches/patch-aa
deleted file mode 100644
index c10334beff4..00000000000
--- a/net/dhisd/patches/patch-aa
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2014/09/23 17:57:04 jperkin Exp $
-
---- Makefile.orig 2001-09-12 18:30:18.000000000 +0900
-+++ Makefile 2004-12-17 14:43:42.000000000 +0900
-@@ -26,11 +26,11 @@
- # DHIS(c) Dynamic Host Information System Release 5.1
-
- CC=gcc
--CFLAGS=-Wall -Wformat -I/usr/local/include # -DDONT_FORK
--LFLAGS=-L/usr/local/lib
-+CFLAGS=-Wall -Wformat -I${LOCALBASE}/include # -DDONT_FORK
-+LFLAGS=${LDFLAGS}
- CP=cp
-
--INSTALLDIR=/etc/dhis/bin
-+INSTALLDIR=${PREFIX}/bin
- MODE=700
- OWNER=root
- MKDIR=mkdir -p
diff --git a/net/dhisd/patches/patch-ab b/net/dhisd/patches/patch-ab
index 24e363c9a02..f481bd4e387 100644
--- a/net/dhisd/patches/patch-ab
+++ b/net/dhisd/patches/patch-ab
@@ -1,24 +1,17 @@
-$NetBSD: patch-ab,v 1.2 2004/01/11 14:49:19 cjep Exp $
+$NetBSD: patch-ab,v 1.3 2015/03/08 01:01:52 mef Exp $
---- dhisd.h.orig 2001-04-01 00:24:33.000000000 +0100
-+++ dhisd.h
-@@ -47,7 +47,6 @@
- #include<sys/signal.h>
- #include<sys/wait.h>
- #include<syslog.h>
--#include<varargs.h>
+Adjust PATH to pkgsrc, see SUBST in Makefile
+
+--- dhisd.h.orig 2008-05-22 21:47:51.000000000 +0900
++++ dhisd.h 2015-03-05 23:55:32.000000000 +0900
+@@ -49,8 +49,8 @@
+ // #include<varargs.h>
#include<gmp.h>
- #define BOURNE_SHELL "/bin/sh"
-@@ -64,9 +63,9 @@
- #define CHECK_FAILS 3 /* maximum check fails */
-
- #define DHISD_PORT 58800
--#define DHISD_PID "/etc/dhis/pid/dhisd.pid"
-+#define DHISD_PID "/var/run/dhisd.pid"
- #define DHISD_DB "/etc/dhis/db/dhis.db"
--#define DHISD_LOG "/etc/dhis/log/dhisd.log"
-+#define DHISD_LOG "/var/log/dhisd.log"
- #define DHISD_SERVICES "/etc/dhis/db/services.db"
+-#define DHISD_CONF_FILE "/usr/local/etc/dhisd.conf"
+-#define DHISD_DB_FILE "/usr/local/etc/dhis.db"
++#define DHISD_CONF_FILE "${PREFIX}/etc/dhisd.conf"
++#define DHISD_DB_FILE "@VARBASE@/db/dhis.db"
- #define MAX_HOSTNAME 64
+ #define DHISD_PID "/var/run/dhis/dhisd.pid"
+ #define DHISD_LOG "/var/log/dhis/dhisd.log"