aboutsummaryrefslogtreecommitdiff
path: root/dns/ddclient
diff options
context:
space:
mode:
authorDanilo Egea Gondolfo <danilo@FreeBSD.org>2014-01-19 02:04:22 +0000
committerDanilo Egea Gondolfo <danilo@FreeBSD.org>2014-01-19 02:04:22 +0000
commitffd012c4ef150bbaa1354b42505c9f5bdb98a2da (patch)
tree2a790279c405fabfb593477e57a916b4e0cb05fe /dns/ddclient
parent79a50af9e519a4beffa143c36d40a597f0a60edc (diff)
downloadports-ffd012c4ef150bbaa1354b42505c9f5bdb98a2da.tar.gz
ports-ffd012c4ef150bbaa1354b42505c9f5bdb98a2da.zip
- Update from 3.8.1 to 3.8.2
- Add stage support - Use options helpers - Use PLIST_FILES instead of pkg-plist PR: ports/185714 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=340227
Diffstat (limited to 'dns/ddclient')
-rw-r--r--dns/ddclient/Makefile62
-rw-r--r--dns/ddclient/distinfo4
-rw-r--r--dns/ddclient/files/patch-ddclient46
-rw-r--r--dns/ddclient/pkg-plist6
4 files changed, 70 insertions, 48 deletions
diff --git a/dns/ddclient/Makefile b/dns/ddclient/Makefile
index 698b10deb216..f712bece239e 100644
--- a/dns/ddclient/Makefile
+++ b/dns/ddclient/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= ddclient
-PORTVERSION= 3.8.1
-PORTREVISION= 1
+PORTVERSION= 3.8.2
CATEGORIES= dns
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -12,51 +11,48 @@ COMMENT= Update dynamic DNS entries
LICENSE= GPLv2
+NO_BUILD= yes
+
USE_BZIP2= yes
USES= perl5
USE_PERL5= run
-NO_BUILD= yes
+
USE_RC_SUBR= ${PORTNAME}
+SUB_FILES= pkg-message ddclient_force
+
OPTIONS_DEFINE= SSL
OPTIONS_DEFAULT=SSL
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSSL}
-RUN_DEPENDS+= p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL
-.endif
-
-SUB_FILES= pkg-message ddclient_force
-PKGMESSAGE= ${WRKDIR}/pkg-message
+SSL_RUN_DEPENDS=ca_root_nss>0:${PORTSDIR}/security/ca_root_nss \
+ p5-IO-Socket-SSL>0:${PORTSDIR}/security/p5-IO-Socket-SSL
-PORTDOCS= COPYING COPYRIGHT Changelog README README.cisco README.ssl \
+PORTDOCS= COPYRIGHT Changelog README.cisco README.ssl README.md \
sample-etc_cron.d_ddclient sample-etc_dhclient-exit-hooks \
sample-etc_dhcpc_dhcpcd-eth0.exe sample-etc_ppp_ip-up.local
+PLIST_FILES= etc/ddclient.conf.sample etc/periodic/daily/ddclient_force \
+ sbin/ddclient
+PLIST_DIRSTRY= etc/periodic/daily etc/periodic
post-patch:
- @${GREP} -lr '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g'
- @${REINPLACE_CMD} \
- -e 's|/tmp|/var/tmp|' \
- -e 's|/var/cache/ddclient|/var/tmp|' \
- -e '/PATH/s|/etc:/usr/local/lib:||' \
- -e 's|/usr.*perl|${PERL}|g' \
- -e 's|/usr/local|${LOCALBASE}|g' \
- -e 's|/etc/ddclient|${PREFIX}/etc|' \
- ${WRKSRC}/ddclient
+ @${GREP} -lR '/usr' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
+ 's|/usr|${PREFIX}|g'
+ @${REINPLACE_CMD} -e \
+ 's|%%PERL%%|${PERL}| ; \
+ s|%%ETCDIR%%|${ETCDIR}| ; \
+ s|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/ddclient
do-install:
- @${INSTALL_DATA} ${WRKSRC}/sample-etc_ddclient.conf ${PREFIX}/etc/ddclient.conf.sample
- @${INSTALL_SCRIPT} ${WRKSRC}/ddclient ${PREFIX}/sbin/
-.if ${PORT_OPTIONS:MDOCS}
- @${INSTALL} -d ${DOCSDIR}
- @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
-.endif
-
-post-install:
- ${MKDIR} ${PREFIX}/etc/periodic/daily
- ${INSTALL_SCRIPT} ${WRKDIR}/ddclient_force ${PREFIX}/etc/periodic/daily/ddclient_force
- @${CAT} ${PKGMESSAGE}
+ (cd ${WRKSRC} && ${INSTALL_DATA} sample-etc_ddclient.conf \
+ ${STAGEDIR}${PREFIX}/etc/ddclient.conf.sample)
+ (cd ${WRKSRC} && ${INSTALL_SCRIPT} ddclient \
+ ${STAGEDIR}${PREFIX}/sbin)
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
+ (cd ${WRKDIR} && ${INSTALL_SCRIPT} ddclient_force \
+ ${STAGEDIR}${PREFIX}/etc/periodic/daily/ddclient_force)
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for i in ${PORTDOCS}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
+.endfor
.include <bsd.port.mk>
diff --git a/dns/ddclient/distinfo b/dns/ddclient/distinfo
index 994d10894bf0..693e83ab9d9e 100644
--- a/dns/ddclient/distinfo
+++ b/dns/ddclient/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ddclient-3.8.1.tar.bz2) = 77a82668a53fdbed1e05ad6febe6dbefb093e3922afb20b993d4ad9ee868258f
-SIZE (ddclient-3.8.1.tar.bz2) = 43711
+SHA256 (ddclient-3.8.2.tar.bz2) = f343d2297b97b769949d4d6c3f603a8c52433acf2104245538808a2ea003ed5e
+SIZE (ddclient-3.8.2.tar.bz2) = 41996
diff --git a/dns/ddclient/files/patch-ddclient b/dns/ddclient/files/patch-ddclient
index d3f732d4e474..a1b387838737 100644
--- a/dns/ddclient/files/patch-ddclient
+++ b/dns/ddclient/files/patch-ddclient
@@ -1,19 +1,43 @@
--- ./ddclient.orig 2011-07-25 19:41:39.000000000 -0700
+++ ./ddclient 2011-07-25 19:41:48.000000000 -0700
-@@ -1,4 +1,3 @@
+@@ -1,5 +1,4 @@
-#!/usr/bin/perl -w
- #!/usr/local/bin/perl -w
+-#!/usr/local/bin/perl -w
++#!%%PERL%% -w
######################################################################
- # $Id: ddclient 130 2011-07-11 21:02:07Z wimpunk $
+ # $Id: ddclient 157 2013-12-26 09:02:05Z wimpunk $
+ #
@@ -19,6 +18,7 @@
use Getopt::Long;
use Sys::Hostname;
use IO::Socket;
+use POSIX 'setsid';
- my ($VERSION) = q$Revision: 130 $ =~ /(\d+)/;
+ my ($VERSION) = q$Revision: 157 $ =~ /(\d+)/;
-@@ -668,6 +668,9 @@
+@@ -29,9 +29,9 @@
+ $program =~ s/d$//;
+ my $now = time;
+ my $hostname = hostname();
+-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/';
+-my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/';
+-my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/';
++my $etc = ($program =~ /test/i) ? './' : '%%ETCDIR%%/';
++my $cachedir = ($program =~ /test/i) ? './' : '/var/tmp/';
++my $savedir = ($program =~ /test/i) ? 'URL/' : '/var/tmp/';
+ my $msgs = '';
+ my $last_msgs = '';
+
+@@ -39,7 +39,7 @@
+ local $file = '';
+ local $lineno = '';
+
+-$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:";
++$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:";
+
+ sub T_ANY {'any'};
+ sub T_STRING {'string'};
+@@ -678,6 +678,9 @@
;
} elsif (opt('daemon')) {
$SIG{'CHLD'} = 'IGNORE';
@@ -23,7 +47,7 @@
my $pid = fork;
if ($pid < 0) {
print STDERR "${program}: can not fork ($!)\n";
-@@ -675,10 +678,9 @@
+@@ -685,10 +688,9 @@
} elsif ($pid) {
exit 0;
}
@@ -36,7 +60,7 @@
}
# write out the pid file if we're daemon'ized
-@@ -1463,17 +1465,17 @@
+@@ -1478,17 +1480,17 @@
## execute the command.
local *FD;
if (! open(FD, $cmd)) {
@@ -58,3 +82,11 @@
} else {
$ok = 1;
+@@ -1878,6 +1880,7 @@
+ $sd = IO::Socket::SSL->new(
+ PeerAddr => $peer,
+ PeerPort => $port,
++ SSL_ca_file => '%%LOCALBASE%%/share/certs/ca-root-nss.crt',
+ Proto => 'tcp',
+ MultiHomed => 1,
+ Timeout => opt('timeout'),
diff --git a/dns/ddclient/pkg-plist b/dns/ddclient/pkg-plist
deleted file mode 100644
index e827e6414423..000000000000
--- a/dns/ddclient/pkg-plist
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $FreeBSD$
-etc/ddclient.conf.sample
-etc/periodic/daily/ddclient_force
-sbin/ddclient
-@dirrmtry etc/periodic/daily
-@dirrmtry etc/periodic