diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-11-08 16:22:22 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-11-08 16:22:22 +0000 |
commit | b108476dabd5ba675c3da32db1fef4ea16ef2d0d (patch) | |
tree | 024545939c8fdbe0f80b9d792d97876c1942d89c /net-mgmt/snmptt | |
parent | cf9f09fb334017d22bc05e1914bfcf0348827a95 (diff) | |
download | ports-b108476dabd5ba675c3da32db1fef4ea16ef2d0d.tar.gz ports-b108476dabd5ba675c3da32db1fef4ea16ef2d0d.zip |
Notes
Diffstat (limited to 'net-mgmt/snmptt')
-rw-r--r-- | net-mgmt/snmptt/Makefile | 47 | ||||
-rw-r--r-- | net-mgmt/snmptt/distinfo | 4 | ||||
-rw-r--r-- | net-mgmt/snmptt/files/snmptt.sh.in (renamed from net-mgmt/snmptt/files/snmptt.sh) | 4 | ||||
-rw-r--r-- | net-mgmt/snmptt/pkg-plist | 10 |
4 files changed, 28 insertions, 37 deletions
diff --git a/net-mgmt/snmptt/Makefile b/net-mgmt/snmptt/Makefile index e4537c4278c0..5e6c8f6f0827 100644 --- a/net-mgmt/snmptt/Makefile +++ b/net-mgmt/snmptt/Makefile @@ -6,7 +6,7 @@ # PORTNAME= snmptt -PORTVERSION= 0.9 +PORTVERSION= 1.0 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -16,61 +16,50 @@ EXTRACT_SUFX= .tgz MAINTAINER= bms@FreeBSD.org COMMENT= SNMP trap handler/translator/swiss-army-knife +RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/SNMP.pm:${PORTSDIR}/net-mgmt/net-snmp \ + ${SITE_PERL}/Config/IniFiles.pm:${PORTSDIR}/devel/p5-Config-IniFiles + WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION} USE_PERL5= yes USE_REINPLACE= yes +USE_RC_SUBR= snmptt.sh + SCRIPTS= snmptt snmptt-net-snmp-test snmpttconvert \ snmpttconvertmib snmptthandler DOCS= faqs.html index.html layout1.css snmptt.html \ snmpttconvert.html snmpttconvertmib.html -RUN_DEPENDS+= \ - ${SITE_PERL}/${PERL_ARCH}/SNMP.pm:${PORTSDIR}/net-mgmt/net-snmp \ - ${SITE_PERL}/Config/IniFiles.pm:${PORTSDIR}/devel/p5-Config-IniFiles - -SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%RC_SUBR%%,${RC_SUBR},g' \ - -e 's,%%RC_DIR%%,${RC_DIR},g' \ - -e 's,%%RC_SUFX%%,${RC_SUFX},g' - -PLIST_SUB+= RC_DIR=${RC_DIR} \ - RC_SUFX=${RC_SUFX} - .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 500038 -RC_SUBR?= ${DESTDIR}/etc/rc.subr -RC_DIR= ${DESTDIR}/etc/rc.d -RC_SUFX= -.else -USE_RC_SUBR= yes -RC_DIR= ${PREFIX}/etc/rc.d -RC_SUFX= .sh -.endif - do-build: post-build: - @${SED} ${SED_SCRIPT} ${FILESDIR}/snmptt.sh > ${WRKDIR}/snmptt.sh - @${ECHO_CMD} ${WRKSRC}/snmptt ${WRKSRC}/snmptthandler | ${XARGS} \ + @${ECHO_CMD} ${WRKSRC}/snmptt ${WRKSRC}/snmptthandler ${WRKSRC}/snmptt.ini | ${XARGS} \ ${REINPLACE_CMD} -e \ "s|/etc/snmptt.ini|${PREFIX}/etc/snmptt.ini|g ; \ - s|/etc/snmp/snmptt.ini|${PREFIX}/etc/snmp/snmptt.ini|g" + s|/etc/snmp/snmptt.ini|${PREFIX}/etc/snmp/snmptt.ini|g ; \ + s|/etc/snmp/snmptt.conf|${PREFIX}/etc/snmp/snmptt.conf.generic|g" do-install: .for _SCRIPT in ${SCRIPTS} ${INSTALL_SCRIPT} ${WRKSRC}/${_SCRIPT} ${PREFIX}/sbin .endfor - ${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${PREFIX}/etc - ${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic ${PREFIX}/etc + ${MKDIR} ${PREFIX}/etc/snmp + ${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${PREFIX}/etc/snmp/snmptt.ini-dist +.if !exists(${PREFIX}/etc/snmp/snmptt.ini) + ${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${PREFIX}/etc/snmp +.endif + ${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic ${PREFIX}/etc/snmp/snmptt.conf.generic-dist +.if !exists(${PREFIX}/etc/snmp/snmptt.conf) + ${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic ${PREFIX}/etc/snmp/snmptt.conf.generic +.endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} .for _DOC in ${DOCS} ${INSTALL_MAN} ${WRKSRC}/docs/${_DOC} ${DOCSDIR} .endfor .endif - ${INSTALL_SCRIPT} ${WRKDIR}/snmptt.sh ${RC_DIR}/snmptt${RC_SUFX} .include <bsd.port.post.mk> diff --git a/net-mgmt/snmptt/distinfo b/net-mgmt/snmptt/distinfo index 5a81236093b3..b713a912f793 100644 --- a/net-mgmt/snmptt/distinfo +++ b/net-mgmt/snmptt/distinfo @@ -1,2 +1,2 @@ -MD5 (snmptt_0.9.tgz) = 85090dee54ed5772c4e6ec939d954271 -SIZE (snmptt_0.9.tgz) = 107679 +MD5 (snmptt_1.0.tgz) = ad93fc3d7b28eb59c153ce2761644838 +SIZE (snmptt_1.0.tgz) = 110663 diff --git a/net-mgmt/snmptt/files/snmptt.sh b/net-mgmt/snmptt/files/snmptt.sh.in index 1b3ce5ff3a83..9d830af79f2a 100644 --- a/net-mgmt/snmptt/files/snmptt.sh +++ b/net-mgmt/snmptt/files/snmptt.sh.in @@ -21,13 +21,13 @@ name=snmptt rcvar=`set_rcvar` command=%%PREFIX%%/sbin/${name} -command_args="--daemon" +command_args=">/dev/null --daemon" pidfile=/var/run/${name}.pid # XXX: Makes assumptions about the interpreter path and version. However, # USE_PERL5 should guarantee that this path is valid. In any event, we # don't sed-ify the #! operators. procname=/usr/bin/perl -required_files=%%PREFIX%%/etc/${name}.ini +required_files=%%PREFIX%%/etc/snmp/${name}.ini # set defaults diff --git a/net-mgmt/snmptt/pkg-plist b/net-mgmt/snmptt/pkg-plist index b184e78fe11c..662d0ba72f32 100644 --- a/net-mgmt/snmptt/pkg-plist +++ b/net-mgmt/snmptt/pkg-plist @@ -3,8 +3,12 @@ sbin/snmptt-net-snmp-test sbin/snmpttconvert sbin/snmpttconvertmib sbin/snmptthandler -etc/snmptt.ini -etc/snmptt.conf.generic +@unexec if cmp -s %D/etc/snmp/snmptt.ini %D/etc/snmp/snmptt.ini-dist; then rm -f %D/etc/snmp/snmptt.ini; fi +etc/snmp/snmptt.ini-dist +@exec [ ! -f %B/snmptt.ini ] && cp %B/%f %B/snmptt.ini +@unexec if cmp -s %D/etc/snmp/snmptt.conf.generic %D/etc/snmp/snmptt.conf.generic-dist; then rm -f %D/etc/snmp/snmptt.conf.generic; fi +etc/snmp/snmptt.conf.generic-dist +@exec [ ! -f %B/snmptt.conf.generic ] && cp %B/%f %B/snmptt.conf.generic %%PORTDOCS%%%%DOCSDIR%%/faqs.html %%PORTDOCS%%%%DOCSDIR%%/index.html %%PORTDOCS%%%%DOCSDIR%%/layout1.css @@ -12,5 +16,3 @@ etc/snmptt.conf.generic %%PORTDOCS%%%%DOCSDIR%%/snmpttconvert.html %%PORTDOCS%%%%DOCSDIR%%/snmpttconvertmib.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@cwd %%RC_DIR%% -snmptt%%RC_SUFX%% |