summaryrefslogtreecommitdiffstats
path: root/testing/noip
diff options
context:
space:
mode:
authorcrow <crow@linux.org.ba>2014-04-30 17:04:27 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2014-04-30 21:33:59 +0200
commitf8a81607259eb1e5396b0dc7af3f46f75624dcfa (patch)
tree67b732492039564bcbfc976b955aafa948936f67 /testing/noip
parentf7f16d39626ba693bff8282159f8a63bb4d52610 (diff)
downloadaports-f8a81607259eb1e5396b0dc7af3f46f75624dcfa.tar.bz2
aports-f8a81607259eb1e5396b0dc7af3f46f75624dcfa.tar.xz
testing/noip: fix init and add patched
Diffstat (limited to 'testing/noip')
-rw-r--r--testing/noip/APKBUILD31
-rw-r--r--testing/noip/noip-2.1.9-daemon.patch0
-rw-r--r--testing/noip/noip-2.1.9-flags.patch11
-rw-r--r--testing/noip/noip.initd32
4 files changed, 55 insertions, 19 deletions
diff --git a/testing/noip/APKBUILD b/testing/noip/APKBUILD
index d8e9a1b0e..ddd41ea8f 100644
--- a/testing/noip/APKBUILD
+++ b/testing/noip/APKBUILD
@@ -1,8 +1,9 @@
-# Contributor: vrabac <crow@linux.org.ba>
+# Contributor: crow <crow@linux.org.ba>
# Maintainer:
pkgname=noip
pkgver=2.1.9
-pkgrel=0
+_pkgver=2.1.9-1
+pkgrel=1
pkgdesc="Dynamic DNS Client Updater for no-ip.com services"
url="http://www.no-ip.com/downloads.php?page=linux"
arch="all"
@@ -10,14 +11,15 @@ license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev"
-install="$pkgname.pre-install $pkgname.post-install"
+install=""
subpackages=""
source="http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
+ noip-2.1.9-flags.patch
+ noip-2.1.9-daemon.patch
noip.initd
- noip.confd
"
-_builddir="$srcdir"/noip-$pkgver-1
+_builddir="$srcdir"/noip-$_pkgver
prepare() {
local i
cd "$_builddir"
@@ -39,19 +41,20 @@ package() {
cd "$_builddir"
install -Dm755 "$_builddir"/noip2 \
- "$pkgdir"/usr/bin/noip2 || return 1
+ "$pkgdir"/usr/sbin/noip2 || return 1
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
- install -m644 -D "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname || return 1
}
md5sums="3b0f5f2ff8637c73ab337be403252a60 noip-duc-linux.tar.gz
-55a411022561a31ca719f8b80783534d noip.initd
-811e1a4255b13db92e3218d7717c21ac noip.confd"
+1959f3f0f57b8455c8701b9c5e5feafe noip-2.1.9-flags.patch
+d41d8cd98f00b204e9800998ecf8427e noip-2.1.9-daemon.patch
+db8264ecaa50e47f952b232beae6ef86 noip.initd"
sha256sums="82b9bafab96a0c53b21aaef688bf70b3572e26217b5e2072bdb09da3c4a6f593 noip-duc-linux.tar.gz
-876e6f06feb4ab6447ad2d85d4b615665d03cae2f6d5572a47036fe57f46a621 noip.initd
-c51f88cca625eb05de518822b6e2dd8fb07773d90a16aad41dc4161a63e9d52c noip.confd"
+07ddd46b9fb7579e20e7f32de061aa9e4fe70bda389b1b780ce3807661b1e543 noip-2.1.9-flags.patch
+e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 noip-2.1.9-daemon.patch
+21b5b1d99742bd4771d160e071e4c11d0a9c7f97832ac18514ebca4beeaca23f noip.initd"
sha512sums="6c32397f31e6f4875a2429398c2627cbe52abba569830ddc1190fed3f4c6cb23e232e60b23d9fa97940f98a1c5c019a89812844f92a655c6ebf275b784015125 noip-duc-linux.tar.gz
-e16b4821caeb99118c100aff179aa9450e6d09dbf6f8520952cabd129c43ddf55b564f33e3eb72d8d455d44f2ebb289b79f122e0b41a2ace2f892f7e7d08b9dd noip.initd
-5c99e2c64d4f065d68a8ba98a0f1c1a857f4d038c2050d37a253b28c4f2a75b96e4ff9721bd51777f0b4997d6683b9a5afa8c8c59ffb32119eb0bb5968b0f669 noip.confd"
+d825dcd16ee8c424865b51d6cd7de64bbde5f772c5ff63d76014ec13b18196208ed09df5a81dd606a8c49cfc422db3ac5d6a306c81137d1447c979158bd164e8 noip-2.1.9-flags.patch
+cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e noip-2.1.9-daemon.patch
+d9a94817337fa79a442171e170189125258ac06443c9763d7d5096e6ea2b1d577dca662dec3c0c3df579923782fe51c84a6972c1429b3cfdaaa139fe7dd510c6 noip.initd"
diff --git a/testing/noip/noip-2.1.9-daemon.patch b/testing/noip/noip-2.1.9-daemon.patch
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/testing/noip/noip-2.1.9-daemon.patch
diff --git a/testing/noip/noip-2.1.9-flags.patch b/testing/noip/noip-2.1.9-flags.patch
new file mode 100644
index 000000000..372b58286
--- /dev/null
+++ b/testing/noip/noip-2.1.9-flags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@
+ # ARCH=sun
+
+ ${TGT}: Makefile ${TGT}.c
+- ${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
++ ${CC} ${CFLAGS} -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} ${LDFLAGS}
+
+ install: ${TGT}
+ if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi
diff --git a/testing/noip/noip.initd b/testing/noip/noip.initd
index ff897cfb9..141c3e5a2 100644
--- a/testing/noip/noip.initd
+++ b/testing/noip/noip.initd
@@ -1,12 +1,34 @@
#!/sbin/runscript
-name=noip
-command=/usr/sbin/noip2
-command_args=$noip_args
-pidfile=$noip_pid
-
depend() {
use logger dns
need net
after firewall
}
+
+checkconfig() {
+ if [ ! -f /etc/no-ip2.conf ]
+ then
+ einfo "Answer the following questions about your no-ip account."
+ noip2 -C || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting noip"
+ start-stop-daemon --quiet --start -x /usr/sbin/noip2 -- -c /etc/no-ip2.conf
+ eend $? "noip did not start, error code $?"
+}
+
+stop() {
+ ebegin "Stopping noip"
+ start-stop-daemon --quiet --stop -x /usr/sbin/noip2
+ noip_ecode=$?
+ eend $noip_ecode "Error stopping the noip daemon, error $noip_ecode"
+ checkconfig || return 1
+ ebegin "Setting noip addresses to 0.0.0.0"
+ noip2 -c /etc/no-ip2.conf -i 0.0.0.0 >& /dev/null
+ eend $? "Failed to set noip addresses to 0.0.0.0, error $?"
+ return $noip_ecode
+} \ No newline at end of file