aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhaby Xiloj <slack.dhabyx@gmail.com>2010-05-11 22:54:59 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-11 22:54:59 +0200
commit16e7bde2ecb5f2c8b735223402d7b04b9c125b81 (patch)
tree4e7ee1f9cd69241f6a0854c88f93c6709ab4f20d
parented02b9b2702084701a64a2930fd59af568277f6e (diff)
network/noip: Added to 12.1 repository
-rw-r--r--network/noip/README8
-rw-r--r--network/noip/doinst.sh15
-rw-r--r--network/noip/noip.SlackBuild78
-rw-r--r--network/noip/noip.info8
-rw-r--r--network/noip/rc.noip.new82
-rw-r--r--network/noip/slack-desc19
6 files changed, 210 insertions, 0 deletions
diff --git a/network/noip/README b/network/noip/README
new file mode 100644
index 000000000000..cf521b6dd59b
--- /dev/null
+++ b/network/noip/README
@@ -0,0 +1,8 @@
+No-IP 2
+
+Keep your current IP address in sync with your No-IP host or domain with
+Dynamic Update Cient (DUC) provided by No-IP.com
+The dynamic DNS update client contiually checks for IP addres changes in
+the background an automatically updates DNS whenever it changes.
+
+To control the daemon, use the included script /etc/rc.d/rc.noip
diff --git a/network/noip/doinst.sh b/network/noip/doinst.sh
new file mode 100644
index 000000000000..37f7daeba4ba
--- /dev/null
+++ b/network/noip/doinst.sh
@@ -0,0 +1,15 @@
+# Handle configuration files
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+# List of configuration files (they should end in .new)
+
+config etc/rc.d/rc.noip.new
diff --git a/network/noip/noip.SlackBuild b/network/noip/noip.SlackBuild
new file mode 100644
index 000000000000..7ba7d9bff0d1
--- /dev/null
+++ b/network/noip/noip.SlackBuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Slackware build script for noip
+
+# Copyright 2008 Dhaby Xiloj <slack.dhabyx@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by SlackBuilds.org
+
+PRGNAM=noip
+VERSION=2.1.9
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG=_SBO}
+CWD=`pwd`
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="COPYING README.* LEEME.PRIMERO LISEZMOI.ENPREMIER"
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar xvzf $CWD/$PRGNAM-duc-linux.tar.gz
+cd $PRGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Rewrite CFLAGS
+if [ "$ARCH" = "i486" ]; then
+ sed -i 's#-Wall -g -O2#-O2 -march=i486 -mtune=i486#' $TMP/$PRGNAM-$VERSION/Makefile
+elif [ "$ARCH" = "i686" ]; then
+ sed -i 's#-Wall -g -O2#-O2 -march=i686 -mtune=i686#' $TMP/$PRGNAM-$VERSION/Makefile
+fi
+
+# eliminate configuration process
+sed -i 's#${BINDIR}/${TGT} -C -c#\#${BINDIR}/${TGT} -C -c#' Makefile
+sed -i 's#mv /tmp/no-ip2.conf#\#mv /tmp/no-ip2.conf#' Makefile
+
+make || exit 1
+make install PREFIX=$PKG/usr CONFDIR=$PKG/etc || exit 1
+
+find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+chmod o-x $PKG/usr/bin/noip2
+
+# Docs, slack-desc, rc.noip, buildscript
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION $PKG/etc/rc.d
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/rc.noip.new > $PKG/etc/rc.d/rc.noip.new
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/noip/noip.info b/network/noip/noip.info
new file mode 100644
index 000000000000..ca8b75f09ad5
--- /dev/null
+++ b/network/noip/noip.info
@@ -0,0 +1,8 @@
+PRGNAM="noip"
+VERSION="2.1.9"
+HOMEPAGE="http://www.no-ip.com"
+DOWNLOAD="http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz"
+MD5SUM="eed8e9ef9edfb7ddc36e187de867fe64"
+MAINTAINER="Dhaby Xiloj"
+EMAIL="slack.dhabyx@gmail.com"
+APPROVED="Erik Hanson"
diff --git a/network/noip/rc.noip.new b/network/noip/rc.noip.new
new file mode 100644
index 000000000000..259c73ca37c5
--- /dev/null
+++ b/network/noip/rc.noip.new
@@ -0,0 +1,82 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.noip
+#
+# start/stop/restart the no-ip.com Dynamic dns client daemon
+#
+# To make noip client start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.noip
+# and add this lines to /etc/rc.d/rc.local
+#
+# if [ -x /etc/rc.d/rc.noip ]; then
+# . /etc/rc.d/rc.noip start
+# fi
+#
+# Written by slack.dhabyx@gmail.com and tested on Slackware 12.1
+#
+
+NOIP_PATH='/usr/bin'
+NOIPCONFIG='/etc/no-ip2.conf'
+
+config_exist() {
+ if [ ! -f $NOIPCONFIG ] ; then
+ echo "Please create the configuration file"
+ echo "$NOIP_PATH/noip2 -C -c $NOIPCONFIG"
+ exit 0;
+ fi
+}
+
+start() {
+ config_exist
+ if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
+ echo "Gateway not defined yet, please init the network services."
+ exit 0;
+ fi
+ echo "Starting no-ip client daemon: "
+ /usr/bin/noip2 -c $NOIPCONFIG
+}
+
+stop() {
+ config_exist
+ if $NOIP_PATH/noip2 -S -c $NOIPCONFIG 2>&1 | grep Process 1> /dev/null ; then
+ echo "Stopping no-ip client daemon: ";
+ for i in `$NOIP_PATH/noip2 -S -c $NOIPCONFIG 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
+ do
+ $NOIP_PATH/noip2 -c $NOIPCONFIG -K $i
+ done
+ else
+ echo "no-ip client daemon is not running" && exit 0
+ fi
+}
+
+status() {
+ config_exist
+ if $NOIP_PATH/noip2 -S -c $NOIPCONFIG 2>&1 | grep Process 1>/dev/null ; then
+ echo "no-ip client daemon is running"
+ else
+ echo "no-ip client daemon is not runnig"
+ fi
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status
+ ;;
+ restart)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart}"
+ exit 1
+esac
diff --git a/network/noip/slack-desc b/network/noip/slack-desc
new file mode 100644
index 000000000000..8ddd0162e69a
--- /dev/null
+++ b/network/noip/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+noip: No-IP 2 (Dynamic Update Cient provided by No-IP.com)
+noip:
+noip: Keep your current IP address in sync with your No-IP host or domain with
+noip: No-IP.com. The dynamic DNS update client contiually checks for IP addres
+noip: changes in the background an automatically updates DNS whenever it
+noip: changes.
+noip:
+noip: http://www.no-ip.com
+noip:
+noip:
+noip: