summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjmmv <jmmv>2003-05-01 18:35:46 +0000
committerjmmv <jmmv>2003-05-01 18:35:46 +0000
commiteb8a5ec548b624c1b3467b3e7434abaae2a10091 (patch)
tree59bd0c629aae54cd052ae8226350779a2ae4a4e4 /net
parent2a5d546006694bc80ee30983638b042ea3181dcd (diff)
downloadpkgsrc-eb8a5ec548b624c1b3467b3e7434abaae2a10091.tar.gz
Convert to use bsd.pkg.install.mk:
- Honour PKG_SYSCONFDIR. - Use OWN_DIRS_PERMS to handle the /var/log/radacct directory. - Use RCD_SCRIPTS to install a NetBSD rc.d compatible script. Bump PKGREVISION to 1.
Diffstat (limited to 'net')
-rw-r--r--net/radiusd-cistron/Makefile26
-rw-r--r--net/radiusd-cistron/PLIST44
-rw-r--r--net/radiusd-cistron/distinfo8
-rw-r--r--net/radiusd-cistron/files/radiusd.sh19
-rw-r--r--net/radiusd-cistron/files/radiusd.sh.tmpl21
-rw-r--r--net/radiusd-cistron/patches/patch-aa4
-rw-r--r--net/radiusd-cistron/patches/patch-ab4
-rw-r--r--net/radiusd-cistron/patches/patch-ac4
8 files changed, 71 insertions, 59 deletions
diff --git a/net/radiusd-cistron/Makefile b/net/radiusd-cistron/Makefile
index 9f9cfb61563..af6d6600979 100644
--- a/net/radiusd-cistron/Makefile
+++ b/net/radiusd-cistron/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2003/05/01 18:05:26 jmmv Exp $
+# $NetBSD: Makefile,v 1.8 2003/05/01 18:35:46 jmmv Exp $
DISTNAME= radiusd-cistron-1.6.6
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.cistron.nl/pub/people/miquels/radius/ \
ftp://ftp.freeradius.org/pub/radius/
@@ -12,13 +13,30 @@ COMMENT= RADIUS-compliant remote authentication and accouting server
CONFLICTS+= freeradius*
USE_BUILDLINK2= YES
+USE_PKGINSTALL= YES
MAKEFILE= Makefile.BSD
BUILD_DIRS= ${WRKSRC}/src
INSTALL_DIRS= ${WRKSRC}/src
+RCD_SCRIPTS= radiusd
+
+OWN_DIRS_PERMS= /var/log/radacct ${ROOT_USER} ${ROOT_GROUP} 700
+
+PKG_SYSCONFSUBDIR= raddb
+EGDIR= ${PREFIX}/share/examples/raddb
+CONF_FILES=
+.for cfile in clients.sample dictionary dictionary.ascend dictionary.bay \
+ dictionary.cisco dictionary.cistron dictionary.compat \
+ dictionary.erx dictionary.livingston dictionary.redback \
+ dictionary.shiva dictionary.tunnel dictionary.usr \
+ dictionary.versanet hints.sample huntgroups.sample \
+ naslist.sample naspasswd.sample realms.sample users.sample
+CONF_FILES+= ${EGDIR}/${cfile} ${PKG_SYSCONFDIR}/${cfile:S/.sample//}
+.endfor
+.undef cfile
+
post-install:
- @${MKDIR} -m 700 /var/log/radacct
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/radiusd-cistron
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${PREFIX}/share/doc/radiusd-cistron
${INSTALL_DATA} ${WRKSRC}/doc/ChangeLog ${PREFIX}/share/doc/radiusd-cistron
@@ -43,9 +61,5 @@ post-install:
${INSTALL_MAN} ${WRKSRC}/doc/radiusd.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/doc/radrelay.8 ${PREFIX}/man/man8
${INSTALL_MAN} ${WRKSRC}/doc/radwatch.8 ${PREFIX}/man/man8
- @${SED} -e "s=!!PREFIX!!=${PREFIX}=g" ${FILESDIR}/radiusd.sh.tmpl \
- > ${PREFIX}/etc/rc.d/radiusd
- @${CHMOD} 555 ${PREFIX}/etc/rc.d/radiusd
- @${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${PREFIX}/etc/rc.d/radiusd
.include "../../mk/bsd.pkg.mk"
diff --git a/net/radiusd-cistron/PLIST b/net/radiusd-cistron/PLIST
index 19eb0146503..ba580b336f9 100644
--- a/net/radiusd-cistron/PLIST
+++ b/net/radiusd-cistron/PLIST
@@ -1,30 +1,10 @@
-@comment $NetBSD: PLIST,v 1.5 2002/12/09 16:01:36 tron Exp $
+@comment $NetBSD: PLIST,v 1.6 2003/05/01 18:35:46 jmmv Exp $
bin/radclient
bin/radlast
bin/radtest
bin/raduse
bin/radwho
bin/radzap
-etc/raddb/clients.sample
-etc/raddb/dictionary
-etc/raddb/dictionary.ascend
-etc/raddb/dictionary.bay
-etc/raddb/dictionary.cisco
-etc/raddb/dictionary.cistron
-etc/raddb/dictionary.compat
-etc/raddb/dictionary.erx
-etc/raddb/dictionary.livingston
-etc/raddb/dictionary.redback
-etc/raddb/dictionary.shiva
-etc/raddb/dictionary.tunnel
-etc/raddb/dictionary.usr
-etc/raddb/dictionary.versanet
-etc/raddb/hints.sample
-etc/raddb/huntgroups.sample
-etc/raddb/naslist.sample
-etc/raddb/naspasswd.sample
-etc/raddb/realms.sample
-etc/raddb/users.sample
etc/rc.d/radiusd
man/man1/radclient.1
man/man1/radlast.1
@@ -52,8 +32,28 @@ share/doc/radiusd-cistron/README.radrelay
share/doc/radiusd-cistron/README.simul
share/doc/radiusd-cistron/README.tunnel
share/doc/radiusd-cistron/README.usersfile
+share/examples/raddb/clients.sample
+share/examples/raddb/dictionary
+share/examples/raddb/dictionary.ascend
+share/examples/raddb/dictionary.bay
+share/examples/raddb/dictionary.cisco
+share/examples/raddb/dictionary.cistron
+share/examples/raddb/dictionary.compat
+share/examples/raddb/dictionary.erx
+share/examples/raddb/dictionary.livingston
+share/examples/raddb/dictionary.redback
+share/examples/raddb/dictionary.shiva
+share/examples/raddb/dictionary.tunnel
+share/examples/raddb/dictionary.usr
+share/examples/raddb/dictionary.versanet
+share/examples/raddb/hints.sample
+share/examples/raddb/huntgroups.sample
+share/examples/raddb/naslist.sample
+share/examples/raddb/naspasswd.sample
+share/examples/raddb/realms.sample
+share/examples/raddb/users.sample
+@dirrm share/examples/raddb
@dirrm share/doc/radiusd-cistron
-@unexec ${RMDIR} %D/etc/raddbr 2>/dev/null || ${TRUE}
@unexec ${RM} -f /var/log/radius.log
@unexec ${RM} -f /var/run/radiusd.pid
@unexec echo "Leaving /var/run/radutmp, /var/log/radwtmp and /var/log/radacct alone."
diff --git a/net/radiusd-cistron/distinfo b/net/radiusd-cistron/distinfo
index 22c08c74d62..0ebd84a013c 100644
--- a/net/radiusd-cistron/distinfo
+++ b/net/radiusd-cistron/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2002/03/05 06:27:48 david Exp $
+$NetBSD: distinfo,v 1.4 2003/05/01 18:35:46 jmmv Exp $
SHA1 (radiusd-cistron-1.6.6.tar.gz) = e043e2236f34ac613e8ab05d6ca907fd2c94d2f8
Size (radiusd-cistron-1.6.6.tar.gz) = 194154 bytes
-SHA1 (patch-aa) = 75e1c68a1732f9c9a4e4f81fba37c5823518cf4a
-SHA1 (patch-ab) = f0dc1a30b20c8057f56f3797b3252ea3a0f79f2b
-SHA1 (patch-ac) = 333090fb0d089774f59039215984962a4ffcce8a
+SHA1 (patch-aa) = 10dc2936e08b8a42a111968cf0e900c843354414
+SHA1 (patch-ab) = cbc69c5466873a8095152b1a3fa278169a8b02b2
+SHA1 (patch-ac) = 95053cdb7cc8a1672d32a953147074ea948e535b
SHA1 (patch-af) = 4d9721cb866c98be64b8aca8675e1f192bca74d2
diff --git a/net/radiusd-cistron/files/radiusd.sh b/net/radiusd-cistron/files/radiusd.sh
new file mode 100644
index 00000000000..1d26fe41b56
--- /dev/null
+++ b/net/radiusd-cistron/files/radiusd.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $NetBSD: radiusd.sh,v 1.1 2003/05/01 18:35:47 jmmv Exp $
+#
+
+# PROVIDE: radiusd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="radiusd"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+command_args="-y"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/radiusd-cistron/files/radiusd.sh.tmpl b/net/radiusd-cistron/files/radiusd.sh.tmpl
deleted file mode 100644
index f12114eedce..00000000000
--- a/net/radiusd-cistron/files/radiusd.sh.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: radiusd.sh.tmpl,v 1.1 2001/10/11 09:57:21 martti Exp $
-#
-
-PREFIX=!!PREFIX!!
-
-case "$1" in
- start)
- ${PREFIX}/sbin/radiusd -y && echo -n ' radiusd'
- ;;
- stop)
- if [ -f /var/run/radiusd.pid ]; then
- kill `cat /var/run/radiusd.pid` && echo -n ' radiusd'
- rm -f /var/run/radiusd.pid
- fi
- ;;
- *)
- echo "$0 start | stop"
- ;;
-esac
diff --git a/net/radiusd-cistron/patches/patch-aa b/net/radiusd-cistron/patches/patch-aa
index ae534863a16..d67d87ef9e6 100644
--- a/net/radiusd-cistron/patches/patch-aa
+++ b/net/radiusd-cistron/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2001/12/20 10:05:50 martti Exp $
+$NetBSD: patch-aa,v 1.3 2003/05/01 18:35:47 jmmv Exp $
--- src/Makefile.BSD.orig Fri Nov 9 17:03:23 2001
+++ src/Makefile.BSD Thu Dec 20 10:46:40 2001
@@ -9,7 +9,7 @@ $NetBSD: patch-aa,v 1.2 2001/12/20 10:05:50 martti Exp $
-CC = gcc
-CFLAGS = -Wall -g -DNOSHADOW
-LDFLAGS = # -s
-+CFLAGS = -DNOSHADOW -DPREFIX=\"$(PREFIX)\"
++CFLAGS = -DNOSHADOW -DPREFIX=\"$(PREFIX)\" -DPKG_SYSCONFDIR=\"$(PKG_SYSCONFDIR)\"
+LDFLAGS = -s
LIBS =
LCRYPT = -lcrypt
diff --git a/net/radiusd-cistron/patches/patch-ab b/net/radiusd-cistron/patches/patch-ab
index 2b6b0ef9ee9..7e0ea7e4313 100644
--- a/net/radiusd-cistron/patches/patch-ab
+++ b/net/radiusd-cistron/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.2 2001/12/20 10:05:50 martti Exp $
+$NetBSD: patch-ab,v 1.3 2003/05/01 18:35:47 jmmv Exp $
--- src/Make.inc.orig Thu Dec 20 10:52:00 2001
+++ src/Make.inc Thu Dec 20 10:52:06 2001
@@ -7,7 +7,7 @@ $NetBSD: patch-ab,v 1.2 2001/12/20 10:05:50 martti Exp $
#
-RADIUS_DIR = /etc/raddb
-+RADIUS_DIR = ${PREFIX}/etc/raddb
++RADIUS_DIR = ${PREFIX}/share/examples/raddb
SERVER_OBJS = radiusd.o files.o acct.o pam.o version.o proxy.o \
exec.o auth.o timestr.o cache.o readusers.o
diff --git a/net/radiusd-cistron/patches/patch-ac b/net/radiusd-cistron/patches/patch-ac
index d72e9e1ac05..e32af64774e 100644
--- a/net/radiusd-cistron/patches/patch-ac
+++ b/net/radiusd-cistron/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.2 2001/12/20 10:05:50 martti Exp $
+$NetBSD: patch-ac,v 1.3 2003/05/01 18:35:47 jmmv Exp $
--- src/conf.h.orig Mon Nov 26 22:51:59 2001
+++ src/conf.h Thu Dec 20 09:36:45 2001
@@ -7,7 +7,7 @@ $NetBSD: patch-ac,v 1.2 2001/12/20 10:05:50 martti Exp $
/* Default Database File Names */
-#define RADIUS_DIR "/etc/raddb"
-+#define RADIUS_DIR PREFIX "/etc/raddb"
++#define RADIUS_DIR PKG_SYSCONFDIR
#define RADLOG_DIR "/var/log"
#ifdef aix