aboutsummaryrefslogtreecommitdiffstats
path: root/dns/ddup
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-02-05 20:21:22 +0800
committeredwin <edwin@FreeBSD.org>2003-02-05 20:21:22 +0800
commit0dd9cce584f3dafef562d584470a9a1213aa35d2 (patch)
tree6cf221d9fc3f2b8cefed8a9d68b6055934c8b1dd /dns/ddup
parent875bd0788269ac2521a025f20b3af2a6b9d0d1f7 (diff)
downloadfreebsd-ports-gnome-0dd9cce584f3dafef562d584470a9a1213aa35d2.tar.gz
freebsd-ports-gnome-0dd9cce584f3dafef562d584470a9a1213aa35d2.tar.zst
freebsd-ports-gnome-0dd9cce584f3dafef562d584470a9a1213aa35d2.zip
Update: net/ddup (3.0.1)
this patch set updates ddup to make it conformant w/ http://clients.dyndns.org/devel/query.php major changes where done by robert@castley.com, so, don't forget to give him credits in the CVS logs. PR: ports/40966 Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Diffstat (limited to 'dns/ddup')
-rw-r--r--dns/ddup/Makefile18
-rw-r--r--dns/ddup/files/Makefile4
-rw-r--r--dns/ddup/files/patch-ddup.c48
-rw-r--r--dns/ddup/files/patch-ddup.h12
-rw-r--r--dns/ddup/files/patch-ddupcron.sh26
-rw-r--r--dns/ddup/files/patch-parse_option.c31
-rw-r--r--dns/ddup/files/patch-update.c30
-rw-r--r--dns/ddup/pkg-descr2
-rw-r--r--dns/ddup/pkg-plist1
9 files changed, 154 insertions, 18 deletions
diff --git a/dns/ddup/Makefile b/dns/ddup/Makefile
index a6fd72cb7fb3..162c02fee9a1 100644
--- a/dns/ddup/Makefile
+++ b/dns/ddup/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ddup
PORTVERSION= 3.0.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITES_LOCAL}
DISTNAME= ${PORTNAME}-${PORTVERSION}-unix
@@ -25,23 +26,26 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKE_ARGS= DEBUG="${DEBUG}"
+.include <bsd.port.pre.mk>
+
post-extract:
- cd ${WRKSRC}; ${GUNZIP_CMD} ddup.1.gz
+ @${GUNZIP_CMD} ${WRKSRC}/ddup.1.gz
post-patch:
@${REINPLACE_CMD} -e 's,!!PREFIX!!,${PREFIX},' ${WRKSRC}/ddupcron.sh
@${REINPLACE_CMD} -e 's,/etc\b,${PREFIX}$$&,' ${WRKSRC}/ddup.1
pre-build:
- ${CP} ${FILESDIR}/Makefile ${WRKSRC}/
- ${ECHO_CMD} "#define file_name \"${PREFIX}/etc/ddup.conf\"" > ${WRKSRC}/options.h
+ @${CP} ${FILESDIR}/Makefile ${WRKSRC}/
+ @${ECHO_CMD} "#define file_name \"${PREFIX}/etc/ddup.conf\"" \
+ > ${WRKSRC}/options.h
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/ddupcron.sh ${PREFIX}/sbin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/ddupcron.sh ${PREFIX}/sbin
.if !defined(NOPORTSDOC)
- ${MKDIR} ${PREFIX}/share/doc/ddup
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ddup/
+ @${MKDIR} ${PREFIX}/share/doc/ddup
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/dns/ddup/files/Makefile b/dns/ddup/files/Makefile
index c875fcafb1c9..10b38361b6e6 100644
--- a/dns/ddup/files/Makefile
+++ b/dns/ddup/files/Makefile
@@ -10,8 +10,8 @@ SRCS= ddup.c \
update.c
CFLAGS+= ${DEBUG}
MAN1= ddup.1
-BINDIR= ${LOCALBASE}/sbin
-MANDIR= ${LOCALBASE}/man/man
+BINDIR= ${PREFIX}/sbin
+MANDIR= ${PREFIX}/man/man
.include <bsd.prog.mk>
diff --git a/dns/ddup/files/patch-ddup.c b/dns/ddup/files/patch-ddup.c
new file mode 100644
index 000000000000..4a177c3070c9
--- /dev/null
+++ b/dns/ddup/files/patch-ddup.c
@@ -0,0 +1,48 @@
+--- ddup.c.orig Tue Oct 31 01:13:23 2000
++++ ddup.c Thu Jul 25 07:25:54 2002
+@@ -26,25 +26,29 @@
+ void usage(void)
+ {
+ printf("DD-UP version %s by Thomas Gandy and Tom Groves (ddupwww@ddup.org)\n", AGENT_VER);
+- printf("Usage: ddup --host host.domain.ext (multiple hosts separated by ,)\n");
+- printf(" (host.domain.ext,host2.domain.ext) [--ip address] [--wildcard]\n");
+- printf(" [--proxyserv server] [--proxyport port] [--help] [--debug] [--mx mxhost]\n");
+- printf(" [--backmx] [--static]\n");
+- printf(" --host host.domain.ext : REQUIRED to update.\n");
+- printf(" Where host.domain.ext is your domain.\n");
+- printf(" eg. gandy.dyndns.org, gandy.ath.cx\n");
+- printf(" --ip address : Forces manual ip specification\n");
+- printf(" Where address is your IP address.\n");
+- printf(" --wildcard : Enables wildcards.\n");
++ printf("Usage: ddup --host host.domain.ext [--ip address] [--wildcard]\n");
++ printf(" [--mx mxhost] [--backmx] [--static | --dynamic | --custom]\n");
++ printf(" [--proxyserv server] [--proxyport port] [--debug]\n");
++ printf(" ddup [--help | --makeconf]\n");
++ printf("\n");
++ printf(" --host host.domain.ext : REQUIRED to update.\n");
++ printf(" Where host.domain.ext is your domain.\n");
++ printf(" Multiple hosts separated by a `,' (comma) may be specified.\n");
++ printf(" e.g. gandy.dyndns.org,gandy.ath.cx\n");
++ printf(" --ip address : Forces manual ip specification\n");
++ printf(" Where address is your IP address.\n");
++ printf(" --wildcard : Enables wildcards.\n");
+ printf(" --mx mxhost : Sets your MX to mxhost.\n");
+ printf(" --backmx : Needs --mx and sets mxhost to be a backup MX.\n");
+- printf(" --proxyserv server : Uses server as proxy.\n");
+- printf(" --proxyport port : connects to proxy with port.\n");
+- printf(" --help : Prints this message.\n");
+- printf(" --debug : Prints debug output of what is sent to server.\n");
+ printf(" --static : Use the Static DNS service. (Added by Patrick D.)\n");
+- printf("\n");
+- printf(" --makeconf : Creates the config file for you. (Base64 Encodes your password)\n");
++ printf(" --dynamic : Use the Dyanmic DNS service. (Added by rwc.)\n");
++ printf(" --custom : Use the Custom DNS service. (Added by rwc.)\n");
++ printf(" --proxyserv server : Uses server as proxy.\n");
++ printf(" --proxyport port : connects to proxy with port.\n");
++ printf(" --debug : Prints debug output of what is sent to server.\n");
++ printf(" --help : Prints this message.\n");
++ printf(" --makeconf : Creates the config file for you.\n");
++ printf(" Base64 Encodes your password.\n");
+ exit(0);
+ }
+
diff --git a/dns/ddup/files/patch-ddup.h b/dns/ddup/files/patch-ddup.h
new file mode 100644
index 000000000000..85bf7c7bf881
--- /dev/null
+++ b/dns/ddup/files/patch-ddup.h
@@ -0,0 +1,12 @@
+diff -u -x CVS -x work -x core -x *.core -x #* -x *~ -x *.orig -x *.rej -I $Id.*$ -I $.+BSD.*$ ddup.h.orig ddup.h
+--- ddup.h.orig Tue Oct 31 01:09:48 2000
++++ ddup.h Mon Jul 22 21:51:52 2002
+@@ -5,7 +5,7 @@
+ #include "options.h"
+
+ #define AGENT_NAME "ddup"
+-#define AGENT_VER "3.0.1"
++#define AGENT_VER "3.0.1.1"
+ #define MEMBERS_HOST "members.dyndns.org"
+
+ /* ddup_functions.c */
diff --git a/dns/ddup/files/patch-ddupcron.sh b/dns/ddup/files/patch-ddupcron.sh
index ed354d7afff8..52d2a0d7da54 100644
--- a/dns/ddup/files/patch-ddupcron.sh
+++ b/dns/ddup/files/patch-ddupcron.sh
@@ -1,6 +1,6 @@
---- ddupcron.sh.orig Mon Oct 23 02:11:48 2000
-+++ ddupcron.sh Thu Nov 2 14:16:39 2000
-@@ -2,19 +2,23 @@
+--- ddupcron.sh.orig Sun Oct 22 19:11:48 2000
++++ ddupcron.sh Thu Jul 25 06:21:51 2002
+@@ -2,26 +2,30 @@
# Define the host to be updated as 1st arguement to script
if [ -z $1 ]; then
@@ -12,18 +12,30 @@
fi
# Define interface to grep address from
-IFACE="eth0"
+-IFCHECK=$(/sbin/ifconfig $IFACE|grep ask|awk '{print $2}'|cut -d ':' -f2)
+if [ -z $2 ]; then
+ IFACE=fxp0
+else
+ IFACE=$2
+fi
- IFCHECK=$(/sbin/ifconfig $IFACE|grep ask|awk '{print $2}'|cut -d ':' -f2)
++IFCHECK=$(/sbin/ifconfig $IFACE|awk '/netmask/{print $2; exit}')
# Define where we should store last IP
- IPFILE="/tmp/ddupip"
+-IPFILE="/tmp/ddupip"
++IPFILE="/var/db/ddup.ip"
IPCHECK=$(cat $IPFILE)
++FILECHECK=$(find $IPFILE -mtime -25)
++
# Define path to ddup and ddup arguments (except --host)
-DDUP_PATH="/home/ddup/ddup"
-+DDUP_PATH="!!PREFIX!!/sbin/ddup"
++DDUP_PATH="%%PREFIX%%/sbin/ddup"
DDUP_ARGS="--debug"
-
+-
+-if [ "$IFCHECK" = "$IPCHECK" ]; then
++if [ "$IFCHECK" = "$IPCHECK" ] && [ "x$FILECHECK" != x ]; then
+ echo "looks like we are still the same ip"
+ else
+ $DDUP_PATH --host $HOST $DDUP_ARGS
+ echo "$IFCHECK" > $IPFILE
+ fi
+-
diff --git a/dns/ddup/files/patch-parse_option.c b/dns/ddup/files/patch-parse_option.c
new file mode 100644
index 000000000000..43bd0f4ae625
--- /dev/null
+++ b/dns/ddup/files/patch-parse_option.c
@@ -0,0 +1,31 @@
+--- parse_option.c.orig Sat Sep 30 21:06:27 2000
++++ parse_option.c Thu Jul 25 06:46:57 2002
+@@ -30,6 +30,8 @@
+ int backmx_flag = 0;
+ /* Flag set by '--static' (Added by Patrick D.) */
+ int static_flag = 0;
++int dynamic_flag = 0;
++int custom_flag = 0;
+ /* Vars for other options */
+ char *ip_address;
+ char *host_id;
+@@ -51,6 +53,8 @@
+ {"version", 0, &ver_flag, 1},
+ /* Added by Patrick D. */
+ {"static", 0, &static_flag, 1},
++ {"dynamic", 0, &dynamic_flag, 1},
++ {"custom", 0, &custom_flag, 1},
+ /* These options don't set a flag.
+ We distinguish them by their indices. */
+ {"ip", 1, 0, 0},
+@@ -98,6 +102,10 @@
+ }
+ }
+
++ if (static_flag+dynamic_flag+custom_flag > 1) {
++ fprintf(stderr, "ddup: --static, --dynamic and --custom options are mutually exclusive.\n");
++ help_flag = 1;
++ }
+ if (help_flag) {
+ usage();
+ }
diff --git a/dns/ddup/files/patch-update.c b/dns/ddup/files/patch-update.c
new file mode 100644
index 000000000000..6e84f17c7d06
--- /dev/null
+++ b/dns/ddup/files/patch-update.c
@@ -0,0 +1,30 @@
+--- update.c.orig Tue Oct 31 01:10:02 2000
++++ update.c Thu Jul 25 06:47:36 2002
+@@ -26,6 +26,8 @@
+ extern int backmx_flag;
+ /* Flag set by '--static' (Added by Patrick D.) */
+ extern int static_flag;
++extern int dynamic_flag;
++extern int custom_flag;
+ /* Vars for other options */
+ extern char *ip_address;
+ extern char *host_id;
+@@ -125,11 +127,14 @@
+ strcat(buf_out, "/nic/update?system=");
+
+ if (static_flag)
+- strcat(buf_out, "stat");
+- else
+- strcat(buf_out, "dyn");
++ strcat(buf_out, "statdns");
++ else if (dynamic_flag)
++ strcat(buf_out, "dyndns");
++ else if (custom_flag)
++ strcat(buf_out, "custom");
+
+- strcat(buf_out, "dns&hostname=");
++
++ strcat(buf_out, "&hostname=");
+ strcat(buf_out, host_id);
+
+ if (ip_address)
diff --git a/dns/ddup/pkg-descr b/dns/ddup/pkg-descr
index a39e2362e40d..7d300c01eb1a 100644
--- a/dns/ddup/pkg-descr
+++ b/dns/ddup/pkg-descr
@@ -15,5 +15,3 @@ Features in this version include:
Author: Thomas Gandy <tegandy@enid.com>
WWW: http://www.ddup.org/
-
-EMAIL: cjm2@altavista.net
diff --git a/dns/ddup/pkg-plist b/dns/ddup/pkg-plist
index 03f294b6ea19..b8453dd59f02 100644
--- a/dns/ddup/pkg-plist
+++ b/dns/ddup/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
sbin/ddup
sbin/ddupcron.sh
share/doc/ddup/README