summaryrefslogtreecommitdiff
path: root/community/noip
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/noip
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/noip')
-rw-r--r--community/noip/PKGBUILD32
-rw-r--r--community/noip/noip-rc.d39
-rw-r--r--community/noip/noip.install11
3 files changed, 82 insertions, 0 deletions
diff --git a/community/noip/PKGBUILD b/community/noip/PKGBUILD
new file mode 100644
index 000000000..4ed673e68
--- /dev/null
+++ b/community/noip/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 5867 2009-11-21 17:42:53Z jlichtblau $
+# Contributor: Lyle Putnam <lcputnam@amerytel.net>
+# Maintainer: Daenyth
+
+pkgname=noip
+pkgver=2.1.9
+pkgrel=2
+pkgdesc="A Dynamic DNS Client Updater for no-ip.com services"
+arch=('i686' 'x86_64')
+url="http://www.no-ip.com/downloads.php?page=linux"
+license=('GPL')
+backup=('etc/no-ip2.conf')
+install=noip.install
+# Note that they have the one file for the current release, so if the md5sum breaks, it means they updated.
+source=('http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz'
+ 'noip-rc.d')
+
+md5sums=('3b0f5f2ff8637c73ab337be403252a60'
+ '63253de6f4d847015d111e5e5b20f2cf')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver-1
+
+ # Their Makefile is fucking horrid, do it by hand instead
+ sed -i '/^#define CONFIG_FILEPATH/s/PREFIX//' noip2.c
+ sed -i '/^#define CONFIG_FILENAME/s/PREFIX//' noip2.c
+ gcc -Wall $CLFAGS $LDFLAGS -g -Dlinux -DPREFIX="/usr" noip2.c -o noip2 || return 1
+
+ install -Dm755 noip2 $pkgdir/usr/bin/noip2
+ install -Dm755 $srcdir/noip-rc.d $pkgdir/etc/rc.d/noip
+}
+# vim:set ts=2 sw=2 et:
diff --git a/community/noip/noip-rc.d b/community/noip/noip-rc.d
new file mode 100644
index 000000000..c40b9d12a
--- /dev/null
+++ b/community/noip/noip-rc.d
@@ -0,0 +1,39 @@
+#!/bin/bash
+_DAEMON=noip
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/${_DAEMON}2`
+case "$1" in
+ start)
+ stat_busy "Starting $_DAEMON"
+ [ -z "$PID" ] && /usr/bin/${_DAEMON}2
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo `pidof -o %PPID /usr/bin/${_DAEMON}2` > /var/run/$_DAEMON.pid
+ add_daemon $_DAEMON
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $_DAEMON"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f /var/run/$_DAEMON.pid
+ rm_daemon $_DAEMON
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/noip/noip.install b/community/noip/noip.install
new file mode 100644
index 000000000..8e0252a4b
--- /dev/null
+++ b/community/noip/noip.install
@@ -0,0 +1,11 @@
+# arg 1: the new package version
+post_install() {
+ echo ""
+ echo "####################################################"
+ echo "# IMPORTANT! #"
+ echo "# BEFORE running noip2 YOU MUST CONFIGURE IT! #"
+ echo "# To configure noip2 run the command \"noip2 -C -Y\" #"
+ echo "####################################################"
+ echo ""
+ sleep 2
+}