Skip site navigation (1)Skip section navigation (2)
Date:      17 Jul 2002 19:52:32 -0000
From:      "Jon-Erik V.Lido" <jlido@goof.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/40703: Port of net/dhid is old.  This PR updates it to 5.1.
Message-ID:  <20020717195232.99950.qmail@goof.com>

next in thread | raw e-mail | index | archive | help

>Number:         40703
>Category:       ports
>Synopsis:       Port of net/dhid is old.  This PR updates it to 5.1.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 17 13:00:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jon-Erik V. Lido
>Release:        FreeBSD 4.6-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD zipper.goof.com 4.6-RELEASE-p2 FreeBSD 4.6-RELEASE-p2 #0: Mon Jul 15 18:16:59 EDT 2002     jlido@zipper.goof.com:/usr/obj/usr/src/sys/ZIPPER  i386


>Description:
	Ports update of DHID dynamic DNS client to version 5.1.
>How-To-Repeat:
>Fix:

--- dhid.shar begins here ---
# 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:
#
#	dhid
#	dhid/Makefile
#	dhid/pkg-comment
#	dhid/pkg-descr
#	dhid/pkg-plist
#	dhid/pkg-install
#	dhid/files
#	dhid/files/patch-aa
#	dhid/files/patch-ab
#	dhid/files/dhid.sh.sample
#	dhid/files/patch-ac
#	dhid/distinfo
#	dhid/pkg-message
#
echo c - dhid
mkdir -p dhid > /dev/null 2>&1
echo x - dhid/Makefile
sed 's/^X//' >dhid/Makefile << 'END-of-dhid/Makefile'
X# New ports collection makefile for:   dhid
X# Date created:        10 July 2002
X# Whom:                Jon Lido <jlido@goof.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	dhid
XPORTVERSION=	5.1
XCATEGORIES=	net
XMASTER_SITES=	ftp://ftp.dhis.org/pub/dhis/
X
XMAINTAINER=    jlido@goof.com
X
X.if !defined(BATCH)
XIS_INTERACTIVE=	true
X.endif
X
Xpost-patch:
X	@${ECHO} "===>   Patching dhid.h"
X	${PERL} -i -p -e "s^__PREFIX__^${PREFIX}^g" ${WRKSRC}/dhid.h
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/dhid ${PREFIX}/sbin
X	${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${FILESDIR}/dhid.sh.sample ${PREFIX}/etc
X
Xpost-install:
X.if !defined(BATCH)
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X	@${CHOWN} dhis ${PREFIX}/etc/dhid.sh.sample
X.endif
X
X.include <bsd.port.mk>
END-of-dhid/Makefile
echo x - dhid/pkg-comment
sed 's/^X//' >dhid/pkg-comment << 'END-of-dhid/pkg-comment'
XDHIS client for updating dynamic DNS entries in dhis DNS tables
END-of-dhid/pkg-comment
echo x - dhid/pkg-descr
sed 's/^X//' >dhid/pkg-descr << 'END-of-dhid/pkg-descr'
XDHIS Daemon Client release 5.1
X==============================
X
Xdhid is the DHIS client daemon. dhid is used to update the DNS tables on
Xa DHIS provider.
X
XIf you haven't done so yet, you will need to register your host with a
XDHIS provider.  Several organizations currently provides this service
Xfor free.  See http://www.dhis.org/dhis/services/ for a list of DHIS
Xservice providers.
X
Xdhid.conf should be configured according to the provider's assigned
Xparameters. Use the dhid.conf.sample for a template.
X
XWWW: http://www.dhis.org/dhis/services/
X
XJon Lido
Xjlido@goof.com
END-of-dhid/pkg-descr
echo x - dhid/pkg-plist
sed 's/^X//' >dhid/pkg-plist << 'END-of-dhid/pkg-plist'
Xbin/genkeys
Xetc/dhid.sh.sample
Xsbin/dhid
END-of-dhid/pkg-plist
echo x - dhid/pkg-install
sed 's/^X//' >dhid/pkg-install << 'END-of-dhid/pkg-install'
X#!/bin/sh
X
XUSER=dhis
XGROUP=${USER}
X
Xask() {
X    local question default answer
X
X    question=$1
X    default=$2
X    if [ -z "${PACKAGE_BUILDING}" ]; then
X        read -p "${question} [${default}]? " answer
X    fi
X    if [ x${answer} = x ]; then
X        answer=${default}
X    fi
X    echo ${answer}
X}
X
Xyesno() {
X    local dflt question answer
X
X    question=$1
X    dflt=$2
X    while :; do
X        answer=$(ask "${question}" "${dflt}")
X        case "${answer}" in
X        [Yy]*)          return 0;;
X        [Nn]*)          return 1;;
X        esac
X        echo "Please answer yes or no."
X    done
X}
X
Xcase $2 in
X
XPOST-INSTALL)
X
X    if pw group show "${GROUP}" >/dev/null 2>&1; then
X        echo "You already have a group \"${GROUP}\", so I will use it."
X    else
X        echo "You need a group \"${GROUP}\"."
X        if which -s pw && yesno "Would you like me to create it" y; then
X            pw groupadd ${GROUP} || exit
X            echo "Done."
X        else
X            echo "Please create it, and try again."
X            if ! grep -q "^${GROUP}:" /etc/passwd; then
X                echo "While you're at it, please create a user \"${USER}\" too,"
X                echo "with a default group of \"${GROUP}\"."
X            fi
X            exit 1
X        fi
X    fi
X
X   if pw user show "${USER}" >/dev/null 2>&1; then
X       echo "You already have a user \"${USER}\", so I will use it."
X   else
X       echo "You need a user \"${USER}\"."
X       if which -s pw && yesno "Would you like me to create it" y; then
X           pw useradd ${USER} -g ${GROUP} -h - -d /nonexistent \
X               -s /nonexistent -c "User &" || exit
X           echo "Done."
X       else
X           echo "Please create it, and try again."
X           exit 1
X       fi
X   fi
X   ;;
X
Xesac
X
END-of-dhid/pkg-install
echo c - dhid/files
mkdir -p dhid/files > /dev/null 2>&1
echo x - dhid/files/patch-aa
sed 's/^X//' >dhid/files/patch-aa << 'END-of-dhid/files/patch-aa'
X--- dhid.h.orig	Wed Jul 10 19:15:31 2002
X+++ dhid.h	Wed Jul 10 20:38:40 2002
X@@ -72,8 +72,8 @@
X #define	OFFLINE_REQ	0x00000551
X 
X 
X-#define	DHID_CONF	"/etc/dhid.conf"
X-#define	DHID_PID	"/etc/dhid.pid"
X+#define	DHID_CONF	"__PREFIX__/etc/dhid.conf"
X+#define	DHID_PID	"/tmp/dhid.pid"
X 
X #define	DEF_ISPORT	58800
X #define	FAIL_ALLOW	3
END-of-dhid/files/patch-aa
echo x - dhid/files/patch-ab
sed 's/^X//' >dhid/files/patch-ab << 'END-of-dhid/files/patch-ab'
X--- main.c.orig	Wed Jul 10 19:15:08 2002
X+++ main.c	Wed Jul 10 19:15:20 2002
X@@ -300,13 +300,6 @@
X 	default: usage(argv);
X 	}
X 
X-	
X-	if(getuid()) {
X-		syslog(LOG_ERR,"%s must be executed by root",argv[0]);
X-		exit(1);
X-	}
X-
X-
X 	close(0);
X 	close(1);
X 	close(2);
END-of-dhid/files/patch-ab
echo x - dhid/files/dhid.sh.sample
sed 's/^X//' >dhid/files/dhid.sh.sample << 'END-of-dhid/files/dhid.sh.sample'
X#!/bin/sh
X
Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
X    echo "$0: Cannot determine the PREFIX" >&2
X    exit 1
Xfi
X
Xcase "$1" in
Xstart)
X	[ -x "${PREFIX}/sbin/dhid" -a -f "${PREFIX}/etc/dhid.conf" ] && ${PREFIX}/sbin/dhid > /dev/null && echo -n ' dhid'
X	;;
Xstop)
X	killall dhid && echo -n ' dhid'
X	;;
X*)
X	echo "Usage: `basename $0` {start|stop}" >&2
X	;;
Xesac
X
Xexit 0
END-of-dhid/files/dhid.sh.sample
echo x - dhid/files/patch-ac
sed 's/^X//' >dhid/files/patch-ac << 'END-of-dhid/files/patch-ac'
X--- Makefile.orig	Thu Jul 11 02:44:01 2002
X+++ Makefile	Thu Jul 11 02:44:13 2002
X@@ -29,7 +29,7 @@
X 
X # Add -lnsl and -lsocket to LIBS in SysV systems 
X #
X-CFLAGS=-I/usr/local/include -DQRC=1 -Wall 
X+CFLAGS+=-I/usr/local/include -DQRC=1 -Wall 
X LFLAGS=-L/usr/local/lib
X LIBS=-lgmp
X 
END-of-dhid/files/patch-ac
echo x - dhid/distinfo
sed 's/^X//' >dhid/distinfo << 'END-of-dhid/distinfo'
XMD5 (dhid-5.1.tar.gz) = 1d905bb1675cca15214268b5e10ebed1
END-of-dhid/distinfo
echo x - dhid/pkg-message
sed 's/^X//' >dhid/pkg-message << 'END-of-dhid/pkg-message'
X
XBefore dhid can run, you will need to register with a DHIS provider.
XSee http://www.dhis.org/dhis/services/ for a list of providers.
XEnter the DHIS account information into the dhid.conf file.
X
END-of-dhid/pkg-message
exit
--- dhid.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717195232.99950.qmail>