ports/105434: [new port] dns/opendd A small DynDNS client
Alexander Logvinov
ports at logvinov.com
Sun Nov 12 12:40:24 UTC 2006
>Number: 105434
>Category: ports
>Synopsis: [new port] dns/opendd A small DynDNS client
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 12 12:40:22 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Alexander Logvinov
>Release: FreeBSD 6.1-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
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.
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# opendd
# opendd/Makefile
# opendd/pkg-descr
# opendd/distinfo
# opendd/files
# opendd/files/patch-Makefile
# opendd/files/opendd.in
#
echo c - opendd
mkdir -p opendd > /dev/null 2>&1
echo x - opendd/Makefile
sed 's/^X//' >opendd/Makefile << 'END-of-opendd/Makefile'
X# New ports collection makefile for: opendd
X# Date created: 11 November 2006
X# Whom: Alexander Logvinov <ports at logvinov.com>
X#
X# $FreeBSD$
X
XPORTNAME= opendd
XPORTVERSION= 0.7.7
XCATEGORIES= dns
XMASTER_SITES= http://www.bsdmon.com/download/
XDISTNAME= ${PORTNAME}.${PORTVERSION}
X
XMAINTAINER= ports at logvinov.com
XCOMMENT= A small DynDNS client
X
XOPTIONS= OPENDD_SSL "Build with SSL support" off \
X RC_NG "Install RC_NG script" on
X
XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
XPORTDOCS= COPYING COPYRIGHT README
XPLIST_FILES= sbin/${PORTNAME} \
X "@unexec if cmp -s %D/etc/${PORTNAME}/${PORTNAME}.conf %D/etc/${PORTNAME}/${PORTNAME}.conf.default; then ${RM} -f %D/etc/${PORTNAME}/${PORTNAME}.conf; fi " \
X "etc/${PORTNAME}/${PORTNAME}.conf.default" \
X "etc/${PORTNAME}/${PORTNAME}.pem" \
X "@dirrmtry etc/${PORTNAME}"
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_RC_NG)
XUSE_RC_SUBR= opendd
X.endif
X
X.if defined(WITH_OPENDD_SSL) && !defined(WITHOUT_SSL)
X.include "${PORTSDIR}/Mk/bsd.openssl.mk"
XCFLAGS+= -I${OPENSSLINC}
XLDFLAGS+= -L${OPENSSLLIB}
XMAKE_ENV+= "USE_SOCKET_SSL=yes"
X.endif
X
Xpre-patch:
X @${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
Xpost-patch:
X.if defined(WITH_OPENDD_SSL) && !defined(WITHOUT_SSL)
X @${REINPLACE_CMD} 's|use_ssl = 0|use_ssl = 1|' ${WRKSRC}/${PORTNAME}.conf
X @${REINPLACE_CMD} -e "s|^FLAGS =|FLAGS = ${CFLAGS}|" ${WRKSRC}/Makefile
X.endif
X.for i in ${PORTNAME}.conf globals.h
X @${REINPLACE_CMD} 's|/etc/${PORTNAME}.pem|${PREFIX}/etc/${PORTNAME}/${PORTNAME}.pem|' \
X ${WRKSRC}/${i}
X.endfor
X @${REINPLACE_CMD} 's|/etc/${PORTNAME}.conf|${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf|' \
X ${WRKSRC}/globals.h
X.if defined(WITH_RC_NG)
X @${REINPLACE_CMD} 's|runasdaemon = 0|runasdaemon = 1|' ${WRKSRC}/${PORTNAME}.conf
X.endif
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/sbin
X @${MKDIR} ${PREFIX}/etc/${PORTNAME}
X ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.default
X ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.pem ${PREFIX}/etc/${PORTNAME}/
X.if !exists(${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf)
X ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}/
X.endif
X @${CHMOD} 600 ${PREFIX}/etc/${PORTNAME}/*.conf
X.if !defined(NOPORTDOCS)
X @${MKDIR} ${DOCSDIR}
X.for i in ${PORTDOCS}
X ${INSTALL_DATA} -p ${WRKSRC}/${i} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.post.mk>
END-of-opendd/Makefile
echo x - opendd/pkg-descr
sed 's/^X//' >opendd/pkg-descr << 'END-of-opendd/pkg-descr'
XOpenDD is a DynDNS client, written in C, and especially designed
Xfor small gateway machines, like a Soekris box. Its main feature
Xis that it does not require any Perl or Python interpreter.
XIt supports HTTPS, can send a mail report, and can run as daemon.
XIt is also very easy to deploy.
X
XWWW: http://www.bsdmon.com/wakka/OpenDD/
END-of-opendd/pkg-descr
echo x - opendd/distinfo
sed 's/^X//' >opendd/distinfo << 'END-of-opendd/distinfo'
XMD5 (opendd.0.7.7.tar.gz) = 03d2d4f502a3fc50ca8be743c037f8e7
XSHA256 (opendd.0.7.7.tar.gz) = 58a57502f12b1e532283ee295ba6cb0274257693ebded913933a035a1769fbdf
XSIZE (opendd.0.7.7.tar.gz) = 49370
END-of-opendd/distinfo
echo c - opendd/files
mkdir -p opendd/files > /dev/null 2>&1
echo x - opendd/files/patch-Makefile
sed 's/^X//' >opendd/files/patch-Makefile << 'END-of-opendd/files/patch-Makefile'
X--- Makefile.orig Mon May 1 07:29:07 2006
X+++ Makefile Sun Nov 12 14:57:38 2006
X@@ -6,7 +6,7 @@
X #
X
X CC = cc
X-FLAGS = -ansi -pedantic -Wall -O2 -fno-strict-aliasing
X+FLAGS = -ansi -Wall -O2 -fno-strict-aliasing # -pedantic
X
X BIN_PROGRAM = opendd
X
END-of-opendd/files/patch-Makefile
echo x - opendd/files/opendd.in
sed 's/^X//' >opendd/files/opendd.in << 'END-of-opendd/files/opendd.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X# PROVIDE: opendd
X# REQUIRE: NETWORKING
X#
X# Add the following line to /etc/rc.conf[.local] to enable opendd
X#
X# opendd_enable (bool): Set to "NO" by default.
X# Set it to "YES" to enable opendd.
X
X. %%RC_SUBR%%
X
Xname="opendd"
Xrcvar=${name}_enable
X
Xload_rc_config $name
X
X: ${opendd_enable="NO"}
X: ${opendd_pidfile="/var/run/opendd.pid"}
X
Xcommand="%%PREFIX%%/sbin/opendd"
Xrequired_files="%%PREFIX%%/etc/opendd/opendd.conf"
Xpidfile="/var/run/opendd.pid"
Xstart_precmd="opendd_check"
X
Xopendd_check()
X{
X if ! egrep -q -i -E "^runasdaemon.*=.*1$" ${required_files}
X then
X err 1 "opendd script need "runasdaemon=1" on config file"
X fi
X}
X
Xrun_rc_command "$1"
END-of-opendd/files/opendd.in
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list