new package: noip 1083/head
authorLawrence D'Anna <larry@elder-gods.org>
Sat, 28 Mar 2015 02:56:18 +0000 (19:56 -0700)
committerLawrence D'Anna <larry@elder-gods.org>
Sat, 28 Mar 2015 03:00:55 +0000 (20:00 -0700)
This is the client program for noip.com, which is a dynamic dns provider.

Signed-off-by: Lawrence D'Anna <larry@elder-gods.org>
net/noip/Makefile [new file with mode: 0644]
net/noip/files/etc/init.d/noip [new file with mode: 0755]
net/noip/files/etc/no-ip2.conf [new file with mode: 0644]
net/noip/patches/001-Makefile-DESTDIR.patch [new file with mode: 0644]
net/noip/patches/002-Makefile-dont-run.patch [new file with mode: 0644]

diff --git a/net/noip/Makefile b/net/noip/Makefile
new file mode 100644 (file)
index 0000000..c2b6aa3
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=noip
+PKG_REV:=1
+PKG_VERSION:=2.1.9-1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=noip-duc-linux.tar.gz
+PKG_SOURCE_URL=http://www.noip.com/client/linux/
+PKG_MD5SUM:=3b0f5f2ff8637c73ab337be403252a60
+PKG_MAINTAINER:="Lawrence D'Anna <larry@elder-gods.org>"
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/noip
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=
+  TITLE:=noip.com client
+  URL:=http://noip.com
+endef
+
+define Package/noip/description
+       This is the ip address update client for noip.com
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               PREFIX="" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               BINDIR="$(PKG_INSTALL_DIR)/usr/bin"  \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               CC="$(TARGET_CC) $(TARGET_CFLAGS)" -O $(TARGET_CPPFLAGS) \
+               LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \
+               install
+endef
+
+define Package/noip/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(CP) ./files/* $(1)/
+endef
+
+$(eval $(call BuildPackage,noip))
diff --git a/net/noip/files/etc/init.d/noip b/net/noip/files/etc/init.d/noip
new file mode 100755 (executable)
index 0000000..e08583f
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+START=99
+
+BIN=noip2
+
+start() {
+    $BIN 
+}
+
+stop() {
+    $BIN -K `pgrep $BIN`
+}
+
+reload() {
+    stop
+    start         
+}
diff --git a/net/noip/files/etc/no-ip2.conf b/net/noip/files/etc/no-ip2.conf
new file mode 100644 (file)
index 0000000..e70f3d6
--- /dev/null
@@ -0,0 +1,2 @@
+# run this to autoconfigure:
+# noip2 -C -c /etc/no-ip2.conf 
diff --git a/net/noip/patches/001-Makefile-DESTDIR.patch b/net/noip/patches/001-Makefile-DESTDIR.patch
new file mode 100644 (file)
index 0000000..349d561
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -3,8 +3,8 @@ CC=gcc
+ PKG=noip-2.1.tgz
+ PREFIX=/usr/local
+-CONFDIR=${PREFIX}/etc
+-BINDIR=${PREFIX}/bin
++CONFDIR=${DESTDIR}/${PREFIX}/etc
++BINDIR=${DESTDIR}/${PREFIX}/bin
+ # these defines are for Linux
+ LIBS=
diff --git a/net/noip/patches/002-Makefile-dont-run.patch b/net/noip/patches/002-Makefile-dont-run.patch
new file mode 100644 (file)
index 0000000..88602aa
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/Makefile
++++ b/Makefile
+@@ -28,8 +28,9 @@ install: ${TGT} 
+       if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi
+       if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR};fi
+       cp ${TGT} ${BINDIR}/${TGT}
+-      ${BINDIR}/${TGT} -C -c /tmp/no-ip2.conf
+-      mv /tmp/no-ip2.conf ${CONFDIR}/no-ip2.conf
++      echo "# run this to autoconfigure:" >no-ip2.conf
++      echo "# ${TGT} -C -c /etc/no-ip2.conf " >>no-ip2.conf
++      mv no-ip2.conf ${CONFDIR}/no-ip2.conf
+ package: ${TGT}
+       rm  -f *.bak