summaryrefslogtreecommitdiffstats
path: root/main/net-snmp/APKBUILD
blob: 7ff3a8ace528d95b94d194af49e2d1589b3db065 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=net-snmp
pkgver=5.4.2.1
pkgrel=4
pkgdesc="Simple Network Management Protocol"
url="http://www.net-snmp.org/"
license="GPL"
depends=
makedepends="perl-dev openssl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-tools"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	snmpd.initd
	snmpd.confd
	snmptrapd.initd
	snmptrapd.confd
	CVE-2008-6123.patch
	"

build() {
	cd "$srcdir/$pkgname-$pkgver"
	patch -p0 -i ../CVE-2008-6123.patch || return 1

	export lt_cv_sys_max_cmd_len=8192

	./configure --prefix=/usr \
		--sysconfdir=/etc/snmp \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-default-snmp-version="3" \
		--with-sys-contact="root@unknown" \
		--with-sys-location="unknown" \
		--with-logfile="/var/log/net-snmpd.log" \
		--enable-ucd-snmp-compatibility \
		--with-persistent-directory="/var/lib/net-snmp" \
		--with-openssl \
		--enable-ipv6 \
		--enable-shared \
		--enable-as-needed \
		--disable-embedded-perl
		# embedded-perl seems to create TEXTREL's

	make -j1 || return 1
	make -j1 DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/snmpd.initd "$pkgdir"/etc/init.d/snmpd
	install -m644 -D "$srcdir"/snmpd.confd "$pkgdir"/etc/conf.d/snmpd
        install -m755 -D "$srcdir"/snmptrapd.initd "$pkgdir"/etc/init.d/snmptrapd
	install -m644 -D "$srcdir"/snmptrapd.confd "$pkgdir"/etc/conf.d/snmptrapd
	install -m644 -D EXAMPLE.conf "$pkgdir"/etc/snmp/snmpd.conf.example
	mkdir -p "$pkgdir"/var/lib/net-snmp
	find "$pkgdir" -name perllocal.pod -delete
}

tools() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}


md5sums="984932520143f0c8bf7b7ce1fc9e1da1  net-snmp-5.4.2.1.tar.gz
198a4a7b80557fa8112394df5ec9914e  snmpd.initd
96510a2f3bc9f21648b03f7e8d76c0d3  snmpd.confd
7ce3e9e880fc6313ae87eb000bae4bda  snmptrapd.initd
363f7728a76bdfc46e29b7e1f5cf4950  snmptrapd.confd
e8eac801c76e03bca7e7bf6b267b0d3d  CVE-2008-6123.patch"