db-move: moved webkitgtk-6.0 from [testing] to [extra] (x86_64)
[arch-packages.git] / net-snmp / repos / extra-x86_64 / PKGBUILD
blob13dfb18804484e7093c278a0242496e5df35d627
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Dale Blount <dale@archlinux.org>
4 pkgname=net-snmp
5 pkgver=5.9.1
6 pkgrel=6
7 pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
8 arch=('x86_64')
9 url="http://www.net-snmp.org/"
10 license=('BSD')
11 depends=('libnsl' 'libpcap' 'lm_sensors' 'pciutils' 'pcre')
12 makedepends=('python-setuptools')
13 optdepends=('perl-term-readkey: for snmpcheck application'
14             'perl-tk: for snmpcheck and tkmib applications'
15             'python: for the python modules')
16 options=('!emptydirs' '!makeflags')
17 source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc}
18         snmpd.service snmptrapd.service)
19 sha512sums=('30989e43034e17433b885854490f2f37470a532cb7cab0d2a3beb37f5f3c2b10e803af125a5177d87fc0a36cecc266fefc016b609427b558f36567c2f1a84b20'
20             'SKIP'
21             '802057d08f4fe69fa9fafed349d37c0f8a6092002b933292563568db274890ae8932a000ecb60c5db0db792ecca30723fc803c0af6da147d148bf059b7f137eb'
22             '82b05b805db5f6870242ea4dfaa58de2865c367208cacfa4fc543c9f2a310d7229dee94ea6054d35c4bab69393f33fd367551727279da4411052589ed37bb4a4')
23 validpgpkeys=('8AAA779B597B405BBC329B6376CF47B8A77C5329'
24               '27CAA4A32E371383A33ED0587D5F9576E0F81533'
25               'D0F8F495DA6160C44EFFBF10F07B9D2DACB19FD6')  # Net-SNMP Administrators
27 prepare() {
28   cd ${pkgname}-${pkgver}
29   autoreconf -i
32 build() {
33   cd ${pkgname}-${pkgver}
34   ./configure --prefix=/usr \
35     --sysconfdir=/etc --sbindir=/usr/bin \
36     --mandir=/usr/share/man \
37     --enable-ucd-snmp-compatibility \
38     --enable-ipv6 \
39     --with-python-modules \
40     --with-default-snmp-version="3" \
41     --with-sys-contact="root@localhost" \
42     --with-sys-location="Unknown" \
43     --with-logfile="/var/log/snmpd.log" \
44     --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod ucd-snmp/lmsensorsMib" \
45     --with-persistent-directory="/var/net-snmp"
46   make NETSNMP_DONT_CHECK_VERSION=1
49 package() {
50   cd ${pkgname}-${pkgver}
51   sed -i -e "s:install --basedir=\$\$dir:install --basedir=\$\$dir --root=${pkgdir}:" Makefile
52   make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install
53   install -D -m644 "${srcdir}/snmpd.service" "${pkgdir}/usr/lib/systemd/system/snmpd.service"
54   install -D -m644 "${srcdir}/snmptrapd.service" "${pkgdir}/usr/lib/systemd/system/snmptrapd.service"
55   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"