aboutsummaryrefslogtreecommitdiff
path: root/dns/opendd
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-11-15 21:23:52 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-11-15 21:23:52 +0000
commitcfd022337a8557d9167f63e397659503da0817ef (patch)
treeeae5d679a2eb0f6bf617fb2d25b01ac40480ecca /dns/opendd
parent7accdcc04952b6947c9082aff83a46059c677217 (diff)
downloadports-cfd022337a8557d9167f63e397659503da0817ef.tar.gz
ports-cfd022337a8557d9167f63e397659503da0817ef.zip
OpenDD is a DynDNS client, written in C, and especially designed
for small gateway machines, like a Soekris box. Its main feature is that it does not require any Perl or Python interpreter. It supports HTTPS, can send a mail report, and can run as daemon. It is also very easy to deploy. WWW: http://www.bsdmon.com/wakka/OpenDD PR: ports/105434 Submitted by: Alexander Logvinov <ports at logvinov.com>
Notes
Notes: svn path=/head/; revision=177356
Diffstat (limited to 'dns/opendd')
-rw-r--r--dns/opendd/Makefile74
-rw-r--r--dns/opendd/distinfo3
-rw-r--r--dns/opendd/files/opendd.in36
-rw-r--r--dns/opendd/files/patch-Makefile11
-rw-r--r--dns/opendd/pkg-descr7
5 files changed, 131 insertions, 0 deletions
diff --git a/dns/opendd/Makefile b/dns/opendd/Makefile
new file mode 100644
index 000000000000..a971c821e3df
--- /dev/null
+++ b/dns/opendd/Makefile
@@ -0,0 +1,74 @@
+# New ports collection makefile for: opendd
+# Date created: 11 November 2006
+# Whom: Alexander Logvinov <ports@logvinov.com>
+#
+# $FreeBSD$
+
+PORTNAME= opendd
+PORTVERSION= 0.7.7
+CATEGORIES= dns
+MASTER_SITES= http://www.bsdmon.com/download/
+DISTNAME= ${PORTNAME}.${PORTVERSION}
+
+MAINTAINER= ports@logvinov.com
+COMMENT= A small DynDNS client
+
+OPTIONS= OPENDD_SSL "Build with SSL support" off \
+ RC_NG "Install RC_NG script" on
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+PORTDOCS= COPYING COPYRIGHT README
+PLIST_FILES= sbin/${PORTNAME} \
+ "@unexec if cmp -s %D/etc/${PORTNAME}/${PORTNAME}.conf %D/etc/${PORTNAME}/${PORTNAME}.conf.default; then ${RM} -f %D/etc/${PORTNAME}/${PORTNAME}.conf; fi " \
+ "etc/${PORTNAME}/${PORTNAME}.conf.default" \
+ "etc/${PORTNAME}/${PORTNAME}.pem" \
+ "@dirrmtry etc/${PORTNAME}"
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_RC_NG)
+USE_RC_SUBR= opendd
+.endif
+
+.if defined(WITH_OPENDD_SSL) && !defined(WITHOUT_SSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -L${OPENSSLLIB}
+MAKE_ENV+= "USE_SOCKET_SSL=yes"
+.endif
+
+pre-patch:
+ @${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+post-patch:
+.if defined(WITH_OPENDD_SSL) && !defined(WITHOUT_SSL)
+ @${REINPLACE_CMD} 's|use_ssl = 0|use_ssl = 1|' ${WRKSRC}/${PORTNAME}.conf
+ @${REINPLACE_CMD} -e "s|^FLAGS =|FLAGS = ${CFLAGS}|" ${WRKSRC}/Makefile
+.endif
+.for i in ${PORTNAME}.conf globals.h
+ @${REINPLACE_CMD} 's|/etc/${PORTNAME}.pem|${PREFIX}/etc/${PORTNAME}/${PORTNAME}.pem|' \
+ ${WRKSRC}/${i}
+.endfor
+ @${REINPLACE_CMD} 's|/etc/${PORTNAME}.conf|${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf|' \
+ ${WRKSRC}/globals.h
+.if defined(WITH_RC_NG)
+ @${REINPLACE_CMD} 's|runasdaemon = 0|runasdaemon = 1|' ${WRKSRC}/${PORTNAME}.conf
+.endif
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin
+ @${MKDIR} ${PREFIX}/etc/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.default
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pem ${PREFIX}/etc/${PORTNAME}/
+.if !exists(${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf)
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}/
+.endif
+ @${CHMOD} 600 ${PREFIX}/etc/${PORTNAME}/*.conf
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} -p ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/dns/opendd/distinfo b/dns/opendd/distinfo
new file mode 100644
index 000000000000..e7c0b00bce1f
--- /dev/null
+++ b/dns/opendd/distinfo
@@ -0,0 +1,3 @@
+MD5 (opendd.0.7.7.tar.gz) = 03d2d4f502a3fc50ca8be743c037f8e7
+SHA256 (opendd.0.7.7.tar.gz) = 58a57502f12b1e532283ee295ba6cb0274257693ebded913933a035a1769fbdf
+SIZE (opendd.0.7.7.tar.gz) = 49370
diff --git a/dns/opendd/files/opendd.in b/dns/opendd/files/opendd.in
new file mode 100644
index 000000000000..380fed5ac8d9
--- /dev/null
+++ b/dns/opendd/files/opendd.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: opendd
+# REQUIRE: NETWORKING
+#
+# Add the following line to /etc/rc.conf[.local] to enable opendd
+#
+# opendd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable opendd.
+
+. %%RC_SUBR%%
+
+name="opendd"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${opendd_enable="NO"}
+: ${opendd_pidfile="/var/run/opendd.pid"}
+
+command="%%PREFIX%%/sbin/opendd"
+required_files="%%PREFIX%%/etc/opendd/opendd.conf"
+pidfile="/var/run/opendd.pid"
+start_precmd="opendd_check"
+
+opendd_check()
+{
+ if ! egrep -q -i -E "^runasdaemon.*=.*1$" ${required_files}
+ then
+ err 1 "opendd script need "runasdaemon=1" on config file"
+ fi
+}
+
+run_rc_command "$1"
diff --git a/dns/opendd/files/patch-Makefile b/dns/opendd/files/patch-Makefile
new file mode 100644
index 000000000000..d88ad03a8f96
--- /dev/null
+++ b/dns/opendd/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig Mon May 1 07:29:07 2006
++++ Makefile Sun Nov 12 14:57:38 2006
+@@ -6,7 +6,7 @@
+ #
+
+ CC = cc
+-FLAGS = -ansi -pedantic -Wall -O2 -fno-strict-aliasing
++FLAGS = -ansi -Wall -O2 -fno-strict-aliasing # -pedantic
+
+ BIN_PROGRAM = opendd
+
diff --git a/dns/opendd/pkg-descr b/dns/opendd/pkg-descr
new file mode 100644
index 000000000000..d24b056d5b64
--- /dev/null
+++ b/dns/opendd/pkg-descr
@@ -0,0 +1,7 @@
+OpenDD is a DynDNS client, written in C, and especially designed
+for small gateway machines, like a Soekris box. Its main feature
+is that it does not require any Perl or Python interpreter.
+It supports HTTPS, can send a mail report, and can run as daemon.
+It is also very easy to deploy.
+
+WWW: http://www.bsdmon.com/wakka/OpenDD