summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 511d783201f5a12e0735a5bbdd4e3d0820974d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: Hans-Nikolai Viessmann <hv15@hw.ac.uk>
# XXX  Currently, it is assumed that the user intends to only
#      use snmptt in standalone-mode, meaning that it is not
#      intended to run as a daemon. As such, additional config
#      and example files have been omitted. Please check the
#      docs on what additional setup is needed.

pkgname=snmptt
pkgver=1.4
pkgrel=1
pkgdesc="This is an SNMP trap handler written in Perl for use with the Net-SNMP / UCD-SNMP snmptrapd program."
arch=('any')
url="http://snmptt.sourceforge.net/"
license=('GPL')
depends=('perl>=5.6.1' 'net-snmp' 'perl-config-inifiles')
optdepends=(
  'perl-dbd-mysql: To add support for MySQL database'
  'perl-dbd-pg: To add support for PostGres database'
  'perl-dbd-odbc: To add support for ODBC driver'
)
install="${pkgname}.install"
changelog='CHANGELOG.md'
source=("https://sourceforge.net/projects/${pkgname}/files/snmptt/${pkgname}_${pkgver}/${pkgname}_${pkgver}.tgz")
md5sums=('43f8ee246256354f41402f46b4bb1b82')

package() {
  cd "${srcdir}/${pkgname}_${pkgver}"

  # install binaries
  install -Dm755 snmptt "$pkgdir/usr/bin/snmptt"
  install -Dm755 snmpttconvert "$pkgdir/usr/bin/snmpttconvert"
  install -Dm755 snmpttconvertmib "$pkgdir/usr/bin/snmpttconvertmib"
  install -Dm755 snmptthandler "$pkgdir/usr/bin/snmptthandler"

  # install config
  install -d "$pkgdir/etc/snmp"
  install -Dm644 snmptt.ini "$pkgdir/etc/snmp/snmptt.ini"
  install -Dm644 examples/snmptt.conf.generic "$pkgdir/etc/snmp/snmptt.conf"

  # install docs
  install -d "$pkgdir/usr/share/doc/snmptt"
  install -Dm644 README "$pkgdir/usr/share/doc/snmptt"
  cp -r docs "$pkgdir/usr/share/doc/snmptt" 
  cp -r examples "$pkgdir/usr/share/doc/snmptt" 
  cp -r contrib "$pkgdir/usr/share/doc/snmptt" 
}

# vim:ts=2:sw=2