summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-07-30 21:04:58 +0000
committerjmmv <jmmv@pkgsrc.org>2003-07-30 21:04:58 +0000
commit9516bd5b9a45816594b993916e47dcf357ae0f07 (patch)
treeb7b5faeb88da435923b8c2fabaeeddfd64b5549f /net
parentf08cc49fbe9b63de1284b4a54b785a5f8f258bf8 (diff)
downloadpkgsrc-9516bd5b9a45816594b993916e47dcf357ae0f07.tar.gz
Convert to the bsd.pkg.install.mk framework:
- Honour PKG_SYSCONFDIR. - Use RCD_SCRIPTS to automatically handle rc.d scripts. Also convert the two installed rc.d scripts to the rc.subr framework (keeping some compatibility if not present). Bump PKGREVISION to 1.
Diffstat (limited to 'net')
-rw-r--r--net/ucd-snmp/Makefile19
-rw-r--r--net/ucd-snmp/distinfo6
-rw-r--r--net/ucd-snmp/files/snmpd.sh50
-rw-r--r--net/ucd-snmp/files/snmptrapd.sh47
-rw-r--r--net/ucd-snmp/patches/patch-aa37
-rw-r--r--net/ucd-snmp/patches/patch-ah13
6 files changed, 82 insertions, 90 deletions
diff --git a/net/ucd-snmp/Makefile b/net/ucd-snmp/Makefile
index 965b31986eb..52e55682369 100644
--- a/net/ucd-snmp/Makefile
+++ b/net/ucd-snmp/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.50 2003/07/17 22:51:58 grant Exp $
+# $NetBSD: Makefile,v 1.51 2003/07/30 21:04:58 jmmv Exp $
DISTNAME= ucd-snmp-4.2.4
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} \
ftp://ucd-snmp.ucdavis.edu/ \
@@ -17,6 +18,7 @@ BUILD_DEFS+= USE_INET6
USE_BUILDLINK2= # defined
USE_PERL5= build
+USE_PKGINSTALL= yes
.include "../../mk/bsd.prefs.mk"
@@ -52,6 +54,11 @@ CONFIGURE_ARGS+= --with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm
CFLAGS+= -Dnetbsd1
.endif
+RCD_SCRIPTS= snmpd snmptrapd
+
+PKG_SYSCONFSUBDIR= snmp
+EGDIR= ${PREFIX}/share/examples/ucd-snmp
+
# Deal with libwrap bogosity by providing these variables to programs which
# do not supply them.
#
@@ -83,16 +90,10 @@ pre-configure:
${MV} -f ${CONFIGURE_SCRIPT}.orig ${CONFIGURE_SCRIPT}
.endif
-post-build:
- ${SED} 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/snmpd.sh > ${WRKDIR}/snmpd
- ${SED} 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/snmptrapd.sh > ${WRKDIR}/snmptrapd
-
post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ucd-snmp
- ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf ${PREFIX}/share/examples/ucd-snmp
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf ${EGDIR}
${INSTALL_DATA_DIR} ${PREFIX}/lib/snmp/dlmod
- ${INSTALL_SCRIPT} ${WRKDIR}/snmpd ${PREFIX}/etc/rc.d
- ${INSTALL_SCRIPT} ${WRKDIR}/snmptrapd ${PREFIX}/etc/rc.d
.include "../../lang/perl5/buildlink2.mk"
.include "../../security/openssl/buildlink2.mk"
diff --git a/net/ucd-snmp/distinfo b/net/ucd-snmp/distinfo
index 3bbb9c179b4..052f653c83a 100644
--- a/net/ucd-snmp/distinfo
+++ b/net/ucd-snmp/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.8 2002/10/02 21:10:11 wiz Exp $
+$NetBSD: distinfo,v 1.9 2003/07/30 21:04:59 jmmv Exp $
SHA1 (ucd-snmp-4.2.4.tar.gz) = b1dbf7c5f6971f1f4419d50630a4b34b82ddc57b
Size (ucd-snmp-4.2.4.tar.gz) = 1706471 bytes
-SHA1 (patch-aa) = 2cef916f05a3052e371f0ae19048ea0680834c78
+SHA1 (patch-aa) = 79655cca63c668e023b3156c2c16efb0e1ee3b6a
SHA1 (patch-ab) = a4bd7337b6c57791d5d0ab936d0fac6c2b1bd497
SHA1 (patch-ac) = 62464c314e6e896810901d89ff8f0bf8ea86e16a
SHA1 (patch-ad) = c84a3eb4b28d83f7cc731b1174be74e56c08a00a
SHA1 (patch-af) = 61b69b70ffeecd715b7691f5d78862d7c216754b
SHA1 (patch-ag) = 8234307641a3a276f32ea2d2516268a31c1c5e97
-SHA1 (patch-ah) = dc336507e41ebfe87003e602493637946beaa201
+SHA1 (patch-ah) = b235a048694893c59f7b2297313b50bf66cf39e2
diff --git a/net/ucd-snmp/files/snmpd.sh b/net/ucd-snmp/files/snmpd.sh
index 3705a465e5b..5557b40c594 100644
--- a/net/ucd-snmp/files/snmpd.sh
+++ b/net/ucd-snmp/files/snmpd.sh
@@ -1,42 +1,26 @@
-#!/bin/sh
+#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: snmpd.sh,v 1.8 2003/03/06 23:00:15 hubertf Exp $
+# $NetBSD: snmpd.sh,v 1.9 2003/07/30 21:05:00 jmmv Exp $
#
# PROVIDE: snmpd
# REQUIRE: DAEMON LOGIN network
#
-# PID file:
-PF=/var/run/snmpd.pid
-
-if [ -f /etc/snmp/snmpd.conf ]
-then
- SNMPD_CFG="-c /etc/snmp/snmpd.conf"
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
fi
-case $1 in
-start)
- if [ -x @PREFIX@/sbin/snmpd ]
- then
- echo 'Starting snmpd.'
- @PREFIX@/sbin/snmpd -s -P ${PF} -A ${SNMPD_CFG}
- fi
- ;;
-stop)
- if [ -f ${PF} ]; then
- kill `cat ${PF}`
- rm -f ${PF}
- else
- echo "$0: snmpd not running or PID not recorded!" 1>&2
- fi
- ;;
-restart)
- sh $0 stop
- sleep 5
- sh $0 start
- ;;
-*)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
-esac
+name="snmpd"
+rcvar="${name}"
+pidfile="/var/run/snmpd.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+command="@PREFIX@/sbin/snmpd"
+command_args="-s -P ${pidfile} -A -c @PKG_SYSCONFDIR@/${name}.conf"
+if [ -f /etc/rc.subr ]; then
+ load_rc_config "$name"
+ run_rc_command "$1"
+else
+ printf " $name"
+ ${command} ${snmpd_flags} ${command_args}
+fi
diff --git a/net/ucd-snmp/files/snmptrapd.sh b/net/ucd-snmp/files/snmptrapd.sh
index 0f0b394dc00..22ac708c218 100644
--- a/net/ucd-snmp/files/snmptrapd.sh
+++ b/net/ucd-snmp/files/snmptrapd.sh
@@ -1,36 +1,25 @@
-#!/bin/sh
+#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: snmptrapd.sh,v 1.6 2003/03/06 23:00:15 hubertf Exp $
+# $NetBSD: snmptrapd.sh,v 1.7 2003/07/30 21:05:00 jmmv Exp $
#
# PROVIDE: snmpd
# REQUIRE: DAEMON LOGIN network
#
-# PID file:
-PF=/var/run/snmptrapd.pid
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
-case $1 in
-start)
- if [ -x @PREFIX@/sbin/snmptrapd ]
- then
- echo 'Starting snmptrapd.'
- @PREFIX@/sbin/snmptrapd -s -l 1 -u ${PF}
- fi
- ;;
-stop)
- if [ -f ${PF} ]; then
- kill `cat ${PF}`
- rm -f ${PF}
- else
- echo "$0: snmptrapd not running or PID not recorded!" 1>&2
- fi
- ;;
-restart)
- sh $0 stop
- sleep 5
- sh $0 start
- ;;
-*)
- echo "Usage: $0 {start|stop|restart}"
- exit 1
-esac
+name="snmptrapd"
+rcvar="${name}"
+pidfile="/var/run/snmptrapd.pid"
+command="@PREFIX@/sbin/snmptrapd"
+command_args="-s -l 1 -u ${pidfile}"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config "$name"
+ run_rc_command "$1"
+else
+ printf " $name"
+ ${command} ${snmptrapd_flags} ${command_args}
+fi
diff --git a/net/ucd-snmp/patches/patch-aa b/net/ucd-snmp/patches/patch-aa
index c4fcadfb366..dcd2d8a525c 100644
--- a/net/ucd-snmp/patches/patch-aa
+++ b/net/ucd-snmp/patches/patch-aa
@@ -1,8 +1,17 @@
-$NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
+$NetBSD: patch-aa,v 1.16 2003/07/30 21:05:00 jmmv Exp $
---- configure.in.orig Wed Mar 27 18:55:22 2002
-+++ configure.in Tue Apr 9 18:24:45 2002
-@@ -1037,18 +1037,18 @@
+--- configure.in.orig 2002-03-27 10:55:22.000000000 +0100
++++ configure.in
+@@ -529,7 +529,7 @@ if test "x$DEFAULT_MIBDIRS" = "x"; then
+ fi
+
+ SNMPCONFPATH=""
+-tmpset="$sysconfdir/snmp"
++tmpset="$sysconfdir"
+ while test "x$tmpset" != "x$SNMPCONFPATH"; do
+ SNMPCONFPATH="$tmpset"
+ eval tmpset="$tmpset"
+@@ -1037,18 +1037,18 @@ dnl rpm-4.0.x needs rpmio.
AC_CHECK_LIB(rpmio, Fopen, [_rpmlibs="-lrpmio $_rpmlibs"],,$_rpmlibs)
dnl now check for rpm using the appropriate libraries.
@@ -33,7 +42,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
dnl Replace `main' with a function in -lkstat:
AC_CHECK_LIB(kstat, kstat_lookup)
-@@ -1073,7 +1073,7 @@
+@@ -1073,7 +1073,7 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
@@ -42,7 +51,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
dnl FreeBSD required headers
AC_CHECK_HEADERS(malloc.h sys/param.h net/if_dl.h sys/sysctl.h stdlib.h net/if_mib.h net/if_types.h net/if_var.h sys/queue.h osreldate.h sys/disklabel.h machine/types.h sys/socketvar.h)
dnl Linux
-@@ -1081,7 +1081,7 @@
+@@ -1081,7 +1081,7 @@ AC_CHECK_HEADERS(sys/conf.h netinet/in_s
dnl NetBSD required headers
AC_CHECK_HEADERS(arpa/inet.h kvm.h sys/pool.h)
dnl BSDi2 headers
@@ -51,7 +60,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
dnl BSDi3 headers
AC_CHECK_HEADERS(sys/stat.h sys/vnode.h ufs/ufs/quota.h ufs/ufs/inode.h)
dnl irix headers
-@@ -1339,11 +1339,7 @@
+@@ -1339,11 +1339,7 @@ AC_CHECK_STRUCT_FOR([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -63,7 +72,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
], rtentry, rt_dst, no)
-@@ -1357,11 +1353,7 @@
+@@ -1357,11 +1353,7 @@ AC_TRY_COMPILE([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -75,7 +84,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
],[
-@@ -1381,11 +1373,7 @@
+@@ -1381,11 +1373,7 @@ AC_TRY_COMPILE([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -87,7 +96,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
],[
struct rtentry rt;
-@@ -1438,11 +1426,7 @@
+@@ -1438,11 +1426,7 @@ AC_TRY_COMPILE([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -99,7 +108,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
],[
struct rtentry rt;
-@@ -1462,11 +1446,7 @@
+@@ -1462,11 +1446,7 @@ AC_CHECK_STRUCT_FOR([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -111,7 +120,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
], rtentry, rt_unit)
-@@ -1475,11 +1455,7 @@
+@@ -1475,11 +1455,7 @@ AC_CHECK_STRUCT_FOR([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -123,7 +132,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
], rtentry, rt_refcnt)
-@@ -1488,11 +1464,7 @@
+@@ -1488,11 +1464,7 @@ AC_CHECK_STRUCT_FOR([
#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -135,7 +144,7 @@ $NetBSD: patch-aa,v 1.15 2002/04/09 09:53:55 itojun Exp $
#include <net/route.h>
], rtentry, rt_hash)
-@@ -1501,11 +1473,7 @@
+@@ -1501,11 +1473,7 @@ AC_CHECK_STRUCT_FOR([
#include <sys/param.h>
#endif
#include <sys/types.h>
diff --git a/net/ucd-snmp/patches/patch-ah b/net/ucd-snmp/patches/patch-ah
index 840c70efe40..73839eb2fea 100644
--- a/net/ucd-snmp/patches/patch-ah
+++ b/net/ucd-snmp/patches/patch-ah
@@ -1,7 +1,16 @@
-$NetBSD: patch-ah,v 1.5 2002/10/02 21:10:12 wiz Exp $
+$NetBSD: patch-ah,v 1.6 2003/07/30 21:05:00 jmmv Exp $
---- configure.orig Mon Apr 8 16:45:00 2002
+--- configure.orig 2002-04-08 16:45:00.000000000 +0200
+++ configure
+@@ -6724,7 +6724,7 @@ EOF
+ fi
+
+ SNMPCONFPATH=""
+-tmpset="$sysconfdir/snmp"
++tmpset="$sysconfdir"
+ while test "x$tmpset" != "x$SNMPCONFPATH"; do
+ SNMPCONFPATH="$tmpset"
+ eval tmpset="$tmpset"
@@ -8180,105 +8180,21 @@ else
fi