summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dns/noip-updater
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dns/noip-updater')
-rw-r--r--net-dns/noip-updater/Manifest1
-rw-r--r--net-dns/noip-updater/files/noip-2.1.9-daemon.patch21
-rw-r--r--net-dns/noip-updater/files/noip-2.1.9-flags.patch11
-rw-r--r--net-dns/noip-updater/files/noip.service12
-rw-r--r--net-dns/noip-updater/files/noip2.start34
-rw-r--r--net-dns/noip-updater/metadata.xml13
-rw-r--r--net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild56
7 files changed, 148 insertions, 0 deletions
diff --git a/net-dns/noip-updater/Manifest b/net-dns/noip-updater/Manifest
new file mode 100644
index 00000000000..5c266764e1d
--- /dev/null
+++ b/net-dns/noip-updater/Manifest
@@ -0,0 +1 @@
+DIST noip-2.1.9.tar.gz 152995 SHA256 86ad0a6362263a33f59a658d1b1ce428e255556ddad0d062aa0ee4b7f412f98a SHA512 3e76d39e22383dc3eceee10f8bdf791fc5ed253c756cd2d345fdd8fb9c9ab3bac6a1a6ca123a26cebbf6e615bb8f236c58d4ecf6254fcaf6b92da17f42f0dd6f WHIRLPOOL 4a737490fdf8be0bc6f708c7f73d2025f62a8e7c043e6259ee34738a5ed1b78d34c4243b58f7f61bb7afcf05d9e786b7f80b16bb641be59f5a5a5bd0929adee3
diff --git a/net-dns/noip-updater/files/noip-2.1.9-daemon.patch b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch
new file mode 100644
index 00000000000..b2fb4e66d0c
--- /dev/null
+++ b/net-dns/noip-updater/files/noip-2.1.9-daemon.patch
@@ -0,0 +1,21 @@
+diff -ur a/noip2.c b/noip2.c
+--- a/noip2.c 2004-01-09 14:18:39.000000000 +0000
++++ b/noip2.c 2007-07-20 14:02:41.100377515 +0100
+@@ -895,16 +895,13 @@
+ char *err_string;
+ static int startup = 1;
+
+- x = fork();
++ x = daemon (0, 0);
+ switch (x) {
+ case -1: // error
+ err_string = strerror(errno);
+ Msg( "Can't fork!! (%s) Ending!\n", err_string);
+ return FATALERR;
+- default: // parent
+- exit(0);
+ case 0: //child
+- setsid();
+ if (get_shm_info() == FATALERR)
+ return FATALERR;
+ log2syslog++;
diff --git a/net-dns/noip-updater/files/noip-2.1.9-flags.patch b/net-dns/noip-updater/files/noip-2.1.9-flags.patch
new file mode 100644
index 00000000000..9fe05f36ac2
--- /dev/null
+++ b/net-dns/noip-updater/files/noip-2.1.9-flags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile 2006-09-07 09:52:55.000000000 +0200
++++ b/Makefile 2006-09-07 09:54:54.000000000 +0200
+@@ -21,7 +21,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/net-dns/noip-updater/files/noip.service b/net-dns/noip-updater/files/noip.service
new file mode 100644
index 00000000000..b4834e843dd
--- /dev/null
+++ b/net-dns/noip-updater/files/noip.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=No-IP Dynamic DNS Update Client
+Require=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/noip2 -c /etc/no-ip2.conf
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-dns/noip-updater/files/noip2.start b/net-dns/noip-updater/files/noip2.start
new file mode 100644
index 00000000000..2330ee66918
--- /dev/null
+++ b/net-dns/noip-updater/files/noip2.start
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+
+depend() {
+ need localmount
+ need net
+ use dns
+}
+
+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
+}
diff --git a/net-dns/noip-updater/metadata.xml b/net-dns/noip-updater/metadata.xml
new file mode 100644
index 00000000000..e8f5cc43b3f
--- /dev/null
+++ b/net-dns/noip-updater/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>influencedchaos@gmail.com</email>
+ <name>Francis Booth</name>
+ <description>Active Maintainer, Assign bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ no-ip.com dynamic DNS updater
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild
new file mode 100644
index 00000000000..493e086f9ad
--- /dev/null
+++ b/net-dns/noip-updater/noip-updater-2.1.9-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo systemd toolchain-funcs
+
+MY_P=${P/-updater/}
+DESCRIPTION="no-ip.com dynamic DNS updater"
+HOMEPAGE="http://www.no-ip.com"
+SRC_URI="http://www.no-ip.com/client/linux/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-devel/gcc"
+
+S=${WORKDIR}/${MY_P}
+
+DOC_CONTENTS="
+ Configuration can be done manually via /usr/sbin/noip2 -C or
+ by using this ebuild's config option.
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/noip-2.1.9-flags.patch
+ epatch "${FILESDIR}"/noip-2.1.9-daemon.patch
+ sed -i \
+ -e "s:\(#define CONFIG_FILEPATH\).*:\1 \"/etc\":" \
+ -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \
+ noip2.c || die "sed failed"
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ PREFIX=/usr \
+ CONFDIR=/etc
+}
+
+src_install() {
+ dosbin noip2
+ dodoc README.FIRST
+ newinitd "${FILESDIR}"/noip2.start noip
+ systemd_dounit "${FILESDIR}"/noip.service
+ readme.gentoo_create_doc
+}
+
+pkg_config() {
+ cd /tmp
+ einfo "Answer the following questions."
+ noip2 -C || die
+}