freebsd-ports/net-mgmt/snmptt/Makefile
Renato Botelho b5aa345939 Modernizing port, several improvements were done:
* Use options helpers
* Create user/group
* Create necessary directories
* Remove unnecessary dependencies
* Add newsyslog conf
* Pet portlint
* Bump PORTREVISION

PR:		218509
Submitted by:	Danilo G. Baio (dbaio) <dbaio@bsd.com.br>
Approved by:	nistor@snickers.org (maintainer)
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D10312
2017-04-25 13:10:30 +00:00

58 lines
1.6 KiB
Makefile

# $FreeBSD$
PORTNAME= snmptt
PORTVERSION= 1.4
PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}_${PORTVERSION}
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= nistor@snickers.org
COMMENT= SNMP trap handler/translator/swiss-army-knife
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= net-snmp>=0:net-mgmt/net-snmp \
p5-Config-IniFiles>=0:devel/p5-Config-IniFiles
NO_BUILD= yes
NO_ARCH= yes
USES= perl5 shebangfix tar:tgz
USE_RC_SUBR= snmptt
SUB_LIST= PERL=${PERL}
PORTDOCS= faqs.html index.html layout1.css snmptt.html \
snmpttconvert.html snmpttconvertmib.html
USERS= snmptt
GROUPS= snmptt
OPTIONS_DEFINE= DOCS
SCRIPTS= snmptt snmptt-net-snmp-test snmpttconvert \
snmpttconvertmib snmptthandler
SHEBANG_FILES= ${SCRIPTS}
post-patch:
${REINPLACE_CMD} -e "s|/var/run|/var/run/${PORTNAME}|" \
-e "s|/etc|${PREFIX}/etc|" ${WRKSRC}/snmptt.ini
do-install:
cd ${WRKSRC} && ${INSTALL_SCRIPT} ${SCRIPTS} ${STAGEDIR}${PREFIX}/sbin
${MKDIR} ${STAGEDIR}${PREFIX}/etc/snmp
${INSTALL_DATA} ${WRKSRC}/snmptt.ini ${STAGEDIR}${PREFIX}/etc/snmp/snmptt.ini.sample
${INSTALL_DATA} ${WRKSRC}/examples/snmptt.conf.generic \
${STAGEDIR}${PREFIX}/etc/snmp/snmptt.conf.generic.sample
${INSTALL_DATA} ${FILESDIR}/newsyslog-snmptt.conf \
${STAGEDIR}${PREFIX}/etc/snmp/newsyslog-snmptt.conf.sample
@${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
@${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
@${MKDIR} ${STAGEDIR}/var/spool/${PORTNAME}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/docs && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>