summaryrefslogtreecommitdiffstats
path: root/dns/noip
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2002-06-25 09:32:29 +0000
committerijliao <ijliao@FreeBSD.org>2002-06-25 09:32:29 +0000
commit8a9537498fdbdda01fd43ea78b9e06b0fad4dc59 (patch)
tree56495b6052563e0d630341bd602bdf282ecbaf19 /dns/noip
parent94b936855cab4fd544d1358141d83501c9af0d3d (diff)
downloadFreeBSD-ports-8a9537498fdbdda01fd43ea78b9e06b0fad4dc59.zip
FreeBSD-ports-8a9537498fdbdda01fd43ea78b9e06b0fad4dc59.tar.gz
add noip 1.6
No-IP.com's dynamic DNS update client PR: 36543 Submitted by: Eyal Soha <esoha@attbi.com>
Diffstat (limited to 'dns/noip')
-rw-r--r--dns/noip/Makefile43
-rw-r--r--dns/noip/distinfo1
-rw-r--r--dns/noip/files/noip.sh19
-rw-r--r--dns/noip/files/patch-no-ip.sh16
-rw-r--r--dns/noip/files/patch-noip.c12
-rw-r--r--dns/noip/pkg-comment1
-rw-r--r--dns/noip/pkg-deinstall21
-rw-r--r--dns/noip/pkg-descr10
-rw-r--r--dns/noip/pkg-install32
-rw-r--r--dns/noip/pkg-message14
-rw-r--r--dns/noip/pkg-plist8
11 files changed, 177 insertions, 0 deletions
diff --git a/dns/noip/Makefile b/dns/noip/Makefile
new file mode 100644
index 0000000..96f654c
--- /dev/null
+++ b/dns/noip/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: No-IP Dynamic Update Client
+# Date created: 28 March 2002
+# Whom: Eyal Soha <esoha@attbi.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= noip
+PORTVERSION= 1.6
+CATEGORIES= net
+MASTER_SITES= http://www.no-ip.com/client/linux/
+DISTNAME= noip_updater_v${PORTVERSION}
+
+MAINTAINER= esoha@attbi.com
+
+ALL_TARGET= noip
+
+post-build:
+ ${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/noip.sh > ${WRKSRC}/noip.sh
+
+pre-install:
+ @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
+ ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/noip ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/noip.sh ${PREFIX}/etc/rc.d
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
+ ${INSTALL_MAN} ${WRKSRC}/README.FIRST ${PREFIX}/share/doc/${PORTNAME}
+ ${INSTALL_MAN} ${WRKSRC}/COPYING ${PREFIX}/share/doc/${PORTNAME}
+ ${MKDIR} ${PREFIX}/share/examples/${PORTNAME}
+ ${INSTALL_MAN} ${WRKSRC}/no-ip.conf.sample ${PREFIX}/share/examples/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKSRC}/no-ip.sh ${PREFIX}/share/examples/${PORTNAME}
+.endif
+ @${SED} "s|%%PREFIX%%|${PREFIX}|g" ${PKGMESSAGE} | ${SED} "s|%%WRKSRC%%|${WRKSRC}|g"
+
+conf:
+ (cd ${PREFIX}/etc && ${PREFIX}/share/examples/noip/no-ip.sh)
+ ${CHOWN} noip:noip ${PREFIX}/etc/no-ip.conf
+ ${CHMOD} 0600 ${PREFIX}/etc/no-ip.conf
+
+.include <bsd.port.mk>
diff --git a/dns/noip/distinfo b/dns/noip/distinfo
new file mode 100644
index 0000000..41d0c1e
--- /dev/null
+++ b/dns/noip/distinfo
@@ -0,0 +1 @@
+MD5 (noip_updater_v1.6.tar.gz) = 6503e2e7d8ea35c304744a318b400a09
diff --git a/dns/noip/files/noip.sh b/dns/noip/files/noip.sh
new file mode 100644
index 0000000..eca1af8
--- /dev/null
+++ b/dns/noip/files/noip.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+case "$1" in
+ start)
+ if [ -x %%PREFIX%%/bin/noip -a -f %%PREFIX%%/etc/no-ip.conf ]; then
+ echo -n ' noip';
+ su -m noip -c '%%PREFIX%%/bin/noip' 2> /dev/null > /dev/null
+ fi
+ ;;
+ stop)
+ echo -n ' noip';
+ killall noip
+ ;;
+ *)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/dns/noip/files/patch-no-ip.sh b/dns/noip/files/patch-no-ip.sh
new file mode 100644
index 0000000..4d083a0
--- /dev/null
+++ b/dns/noip/files/patch-no-ip.sh
@@ -0,0 +1,16 @@
+--- no-ip.sh.orig Wed Oct 10 16:35:12 2001
++++ no-ip.sh Fri Mar 29 01:55:11 2002
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # configuration file builder script for no-ip
+ #
+@@ -89,7 +90,7 @@
+ #
+ if [ "$NAT" = "N" ]
+ then
+- devs=`tail +3 /proc/net/dev | awk -F: '{print $1}' | tr -d ' '|tr '\n' ' '`
++ devs=`ifconfig -l inet`
+ DEV=foo
+ while [ "$DEV" = "foo" ]
+ do
diff --git a/dns/noip/files/patch-noip.c b/dns/noip/files/patch-noip.c
new file mode 100644
index 0000000..04b51cd
--- /dev/null
+++ b/dns/noip/files/patch-noip.c
@@ -0,0 +1,12 @@
+--- noip.c.bak Sat Mar 30 17:59:58 2002
++++ noip.c Sat Mar 30 17:59:15 2002
+@@ -452,7 +452,8 @@
+ else
+ getip(IPaddress);
+ #ifdef DEBUG
+- ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress);
++ if (debug)
++ ErrMsg("! LIA = %s, IP = %s",Last_IP_Addr, IPaddress);
+ #endif
+ if ((*IPaddress != 0) &&
+ (strcmp(IPaddress, Last_IP_Addr) != 0)) {
diff --git a/dns/noip/pkg-comment b/dns/noip/pkg-comment
new file mode 100644
index 0000000..608172d
--- /dev/null
+++ b/dns/noip/pkg-comment
@@ -0,0 +1 @@
+No-IP.com's dynamic DNS update client
diff --git a/dns/noip/pkg-deinstall b/dns/noip/pkg-deinstall
new file mode 100644
index 0000000..93a3036
--- /dev/null
+++ b/dns/noip/pkg-deinstall
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+PW=/usr/sbin/pw
+ECHO=echo
+USER=noip
+GROUP=${USER}
+
+if [ -f ${PKG_PREFIX}/etc/no-ip.conf ]; then
+ ${ECHO} "To delete noip configuration permanently: rm ${PKG_PREFIX}/etc/no-ip.conf"
+fi
+if ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
+ ${ECHO} "To delete noip user permanently: ${PW} userdel ${USER}"
+fi
+if ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ ${ECHO} "To delete noip group permanently: ${PW} groupdel ${GROUP}"
+fi
+exit 0
diff --git a/dns/noip/pkg-descr b/dns/noip/pkg-descr
new file mode 100644
index 0000000..6e3b589
--- /dev/null
+++ b/dns/noip/pkg-descr
@@ -0,0 +1,10 @@
+This is a port of No-IP.com's dynamic DNS update client. When
+configured correctly, the client will check the local IP address at a
+given time interval for any changes. If the local IP address has
+changed it will notify the DNS servers at No-IP.com and update the IP
+corresponding to your No-IP/No-IP+ hostname.
+
+WWW: http://www.No-IP.com/
+
+- Eyal Soha
+esoha@attbi.com
diff --git a/dns/noip/pkg-install b/dns/noip/pkg-install
new file mode 100644
index 0000000..f4efdf4
--- /dev/null
+++ b/dns/noip/pkg-install
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+PW=/usr/sbin/pw
+ECHO=echo
+USER=noip
+GROUP=${USER}
+
+if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ if ${PW} groupadd ${GROUP}; then
+ ${ECHO} "Added group \"${GROUP}\"."
+ else
+ ${ECHO} "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
+ if ${PW} useradd ${USER} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "noip_updater pseudo-user"; \
+ then
+ ${ECHO} "Added user \"${USER}\"."
+ else
+ ${ECHO} "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+exit 0
diff --git a/dns/noip/pkg-message b/dns/noip/pkg-message
new file mode 100644
index 0000000..a8fd115
--- /dev/null
+++ b/dns/noip/pkg-message
@@ -0,0 +1,14 @@
+##################################################################
+You need to generate the noip config file 'no-ip.conf' in
+%%PREFIX%%/etc/no-ip.conf. To do this automatically, run:
+
+ make conf
+
+To do it manually, copy
+%%PREFIX%%/share/examples/noip/no-ip.conf.sample to
+%%PREFIX%%/etc/no-ip.conf and edit it or use
+%%PREFIX%%/share/examples/noip/no-ip.sh to make no-ip.conf. Then
+chown to noip:noip and chmod to 0600.
+
+You need to register with www.no-ip.com to use this port.
+##################################################################
diff --git a/dns/noip/pkg-plist b/dns/noip/pkg-plist
new file mode 100644
index 0000000..3ac22b4
--- /dev/null
+++ b/dns/noip/pkg-plist
@@ -0,0 +1,8 @@
+bin/noip
+etc/rc.d/noip.sh
+%%PORTDOCS%%share/doc/noip/README.FIRST
+%%PORTDOCS%%share/doc/noip/COPYING
+%%PORTDOCS%%share/examples/noip/no-ip.conf.sample
+%%PORTDOCS%%share/examples/noip/no-ip.sh
+%%PORTDOCS%%@dirrm share/doc/noip
+%%PORTDOCS%%@dirrm share/examples/noip
OpenPOWER on IntegriCloud