pkgsrc/net/snmptt/Makefile
bouyer ca3e2c3ed9 Import of snmptt 1.3
SNMPTT (SNMP Trap Translator) is an SNMP trap handler written in Perl for
use with the Net-SNMP / UCD-SNMP snmptrapd program (www.net-snmp.org).
SNMPTT supports Linux, Unix and Windows.

Snmptt can log to any of the following destinations: text log, syslog,
NT Event log or a SQL database. External programs can also be run to pass
the translated trap to an email client, paging software, Nagios etc.

In addition to variable substitution, SNMPTT allows complex configurations
allowing:

    * the ability to accept or reject a trap based on the host name,
      ip address, network range, or variable values inside of the trap
      enterprise variables
    * execute external programs to send pages, emails etc
    * perform regular expression search and replace on the translated message
      such as translating the variable value "Building alarm 4" to
      "Moisture detection alarm"
2011-04-13 10:23:47 +00:00

95 lines
2.8 KiB
Makefile

# $NetBSD: Makefile,v 1.1.1.1 2011/04/13 10:23:47 bouyer Exp $
#
DISTNAME= snmptt_1.3
EXTRACT_SUFX= .tgz
PKGNAME= snmptt-1.3
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=snmptt/}
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://www.snmptt.org/
COMMENT= SNMP trap handler written in Perl
DEPENDS+= p5-Config-IniFiles-[0-9]*:../../devel/p5-Config-IniFiles
DEPENDS+= p5-Time-HiRes-[0-9]*:../../time/p5-Time-HiRes
DEPENDS+= p5-Text-Balanced-[0-9]*:../../textproc/p5-Text-Balanced
DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
DEPENDS+= p5-DBD-ODBC-[0-9]*:../../databases/p5-DBD-ODBC
DEPENDS+= p5-Digest-MD5-[0-9]*:../../security/p5-Digest-MD5
WRKSRC= ${WRKDIR}/${DISTNAME}
PKG_SYSCONFSUBDIR= snmptt
PKG_DESTDIR_SUPPORT= user-destdir
INSTALLATION_DIRS+= sbin
RCD_SCRIPTS= snmptt
BUILD_DEFS+= VARBASE
.include "../../mk/bsd.prefs.mk"
EGDIR= ${PREFIX}/share/examples/snmptt
CONF_FILES= ${EGDIR}/snmptt.ini ${PKG_SYSCONFDIR}/snmptt.ini
DOCDIR= ${PREFIX}/share/doc/html/snmptt
MAKE_DIRS_PERMS+= ${VARBASE}/spool/snmptt ${ROOT_USER} ${ROOT_GROUP} 0755
USE_TOOLS+= perl:run
REPLACE_PERL+= snmptt
REPLACE_PERL+= snmptt-net-snmp-test
REPLACE_PERL+= snmpttconvert
REPLACE_PERL+= snmptthandler
REPLACE_PERL+= snmptthandler-embedded
REPLACE_PERL+= snmpttconvertmib
SUBST_CLASSES+= installdir etcdir vardir log
SUBST_STAGE.installdir= pre-configure
SUBST_FILES.installdir= snmptt
SUBST_FILES.installdir+= snmptthandler
SUBST_FILES.installdir+= snmptthandler-embedded
SUBST_SED.installdir= -e "s|/sbin|${PREFIX}/sbin|g"
SUBST_MESSAGE.installdir= Fixing hardcoded install directory path.
SUBST_STAGE.etcdir= pre-configure
SUBST_FILES.etcdir= snmptt
SUBST_FILES.etcdir+= snmptt.ini
SUBST_FILES.etcdir+= snmptthandler
SUBST_FILES.etcdir+= docs/faqs.html
SUBST_FILES.etcdir+= docs/snmptt.html
SUBST_FILES.etcdir+= docs/snmpttconvertmib.html
SUBST_FILES.etcdir+= snmptthandler-embedded
SUBST_SED.etcdir= -e "s|/etc|${PKG_SYSCONFDIR}|g"
SUBST_MESSAGE.etcdir= Fixing hardcoded /etc path.
SUBST_STAGE.vardir= pre-configure
SUBST_FILES.vardir= snmptt snmptt.ini
SUBST_SED.vardir= -e "s|/var|${VARBASE}|g"
SUBST_MESSAGE.vardir= Fixing hardcoded /var path.
SUBST_STAGE.log= pre-configure
SUBST_FILES.log= snmptt.ini
SUBST_SED.log= -e "s|/log/snmptt/|/log/|g"
SUBST_MESSAGE.log= move ${VARBASE}/log/snmptt/ to ${VARBASE}/log
do-build:
do-install:
for i in snmptt snmptt-net-snmp-test snmpttconvert \
snmptthandler snmptthandler-embedded snmpttconvertmib; do \
${INSTALL_SCRIPT} ${WRKSRC}/$$i ${DESTDIR}${PREFIX}/sbin/; \
done
${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
for i in snmptt.ini; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${DESTDIR}${EGDIR}/; \
done
${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
for i in docs/*; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${DESTDIR}${DOCDIR}/; \
done
.include "../../net/net-snmp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"