# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=net-snmp pkgver=5.6.1 pkgrel=2 pkgdesc="Simple Network Management Protocol" url="http://www.net-snmp.org/" arch="all" license="GPL" depends= depends_dev="openssl-dev" 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 " _builddir="$srcdir/$pkgname-$pkgver" build() { cd "$_builddir" export lt_cv_sys_max_cmd_len=8192 #build fails on: libnetsnmpmibs.so: undefined reference to `pthread_create' LDFLAGS="$LDFLAGS -lpthread" ./configure --prefix=/usr \ --sysconfdir=/etc \ --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 || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/*.la || return 1 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="b4e30ead5783b0bb1d280172c6095ea4 net-snmp-5.6.1.tar.gz 198a4a7b80557fa8112394df5ec9914e snmpd.initd 96510a2f3bc9f21648b03f7e8d76c0d3 snmpd.confd 7ce3e9e880fc6313ae87eb000bae4bda snmptrapd.initd 363f7728a76bdfc46e29b7e1f5cf4950 snmptrapd.confd"