diff options
Diffstat (limited to 'network/noip2')
-rw-r--r-- | network/noip2/README | 8 | ||||
-rw-r--r-- | network/noip2/doinst.sh | 15 | ||||
-rw-r--r-- | network/noip2/noip2.SlackBuild | 81 | ||||
-rw-r--r-- | network/noip2/noip2.info | 10 | ||||
-rw-r--r-- | network/noip2/rc.noip2.new | 82 | ||||
-rw-r--r-- | network/noip2/slack-desc | 19 |
6 files changed, 215 insertions, 0 deletions
diff --git a/network/noip2/README b/network/noip2/README new file mode 100644 index 0000000000..13656290ff --- /dev/null +++ b/network/noip2/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.noip2 diff --git a/network/noip2/doinst.sh b/network/noip2/doinst.sh new file mode 100644 index 0000000000..c2154ed914 --- /dev/null +++ b/network/noip2/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.noip2.new diff --git a/network/noip2/noip2.SlackBuild b/network/noip2/noip2.SlackBuild new file mode 100644 index 0000000000..ee0caeb85e --- /dev/null +++ b/network/noip2/noip2.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh + +# Slackware build script for NoIP2 + +# 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=noip2 +SRCNAM=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 $SRCNAM-$VERSION-1 +tar xvzf $CWD/$SRCNAM-duc-linux.tar.gz +cd $SRCNAM-$VERSION-1 || exit 1 +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +set -e + +# Rewrite CFLAGS +if [ "$ARCH" = "i486" ]; then + sed -i 's#-Wall -g#-O2 -march=i486 -mtune=i686#' Makefile +elif [ "$ARCH" = "i686" ]; then + sed -i 's#-Wall -g#-O2 -march=i686 -mtune=i686#' Makefile +elif [ "$ARCH" = "x86_64" ]; then + sed -i 's#-Wall -g#-O2 -fPIC#' Makefile +fi + +# eliminate configuration process +sed -i '/\${BINDIR}\/\${TGT} -C -c/d' Makefile +sed -i '/mv \/tmp\/no-ip2\.conf/d' Makefile + +make +make install PREFIX=$PKG/usr CONFDIR=$PKG/etc + +find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + +# Docs, slack-desc, rc.noip2, buildscript +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION $PKG/etc/rc.d +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/rc.noip2.new > $PKG/etc/rc.d/rc.noip2.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.${PKGTYPE:-tgz} diff --git a/network/noip2/noip2.info b/network/noip2/noip2.info new file mode 100644 index 0000000000..1225f8a08b --- /dev/null +++ b/network/noip2/noip2.info @@ -0,0 +1,10 @@ +PRGNAM="noip2" +VERSION="2.1.9" +HOMEPAGE="http://www.no-ip.com" +DOWNLOAD="http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz" +MD5SUM="3b0f5f2ff8637c73ab337be403252a60" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="DhabyX" +EMAIL="slack.dhabyx@gmail.com" +APPROVED="Erik Hanson" diff --git a/network/noip2/rc.noip2.new b/network/noip2/rc.noip2.new new file mode 100644 index 0000000000..d0284b9192 --- /dev/null +++ b/network/noip2/rc.noip2.new @@ -0,0 +1,82 @@ +#!/bin/sh +# +# /etc/rc.d/rc.noip2 +# +# start/stop/restart the no-ip.com Dynamic dns client daemon +# +# To make noip2 client start automatically at boot, make this +# file executable: chmod 755 /etc/rc.d/rc.noip2 +# and add this lines to /etc/rc.d/rc.local +# +# if [ -x /etc/rc.d/rc.noip2 ]; then +# . /etc/rc.d/rc.noip2 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/noip2/slack-desc b/network/noip2/slack-desc new file mode 100644 index 0000000000..0c70ba289f --- /dev/null +++ b/network/noip2/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------------------------------------------------------| +noip2: No-IP 2 (Dynamic Update Cient provided by No-IP.com) +noip2: +noip2: Keep your current IP address in sync with your No-IP host or domain +noip2: with No-IP.com. The dynamic DNS update client contiually checks for +noip2: IP address changes in the background and automatically updates DNS +noip2: whenever it changes. +noip2: +noip2: http://www.no-ip.com +noip2: +noip2: +noip2: |