mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 19:47:13 +08:00
4fa66c12ef
Conflicts: mysql-python/PKGBUILD net-snmp/PKGBUILD python-cssutils/PKGBUILD python-dateutil/PKGBUILD python-distutils-extra/PKGBUILD python-jinja/PKGBUILD python-markupsafe/PKGBUILD python-simplejson/PKGBUILD python2-udev/PKGBUILD
66 lines
2.3 KiB
Bash
66 lines
2.3 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of chakra-project.org
|
|
|
|
pkgname=net-snmp
|
|
pkgver=5.7.2
|
|
pkgrel=5
|
|
pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
|
|
arch=('x86_64')
|
|
url="http://www.net-snmp.org/"
|
|
license=('BSD')
|
|
depends=('openssl' 'libnl' 'pciutils')
|
|
makedepends=('python2-setuptools')
|
|
optdepends=('perl-term-readkey: for snmpcheck application'
|
|
'perl-tk: for snmpcheck application'
|
|
'python2: for the python modules')
|
|
provides=('ucd-snmp')
|
|
backup=('etc/conf.d/snmpd')
|
|
options=('!libtool' '!makeflags' '!emptydirs')
|
|
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
|
|
'snmpd.service'
|
|
'snmpd.confd'
|
|
'libnl32.patch')
|
|
sha256sums=('09ed31b4cc1f3c0411ef9a16eff79ef3b30d89c32ca46d5a01a41826c4ceb816'
|
|
'80b0794c9abf1e38935ef0f98a6157ea348893ff088643ef81fdff04c2a5dd6b'
|
|
'ae07e5123b969ae98529b5fc5ffe01bf82def2fdb3cc7bdcb4cf684c6583c32c'
|
|
'08b8909deb81daac5ae454dcf0f50ee1d6794aa7dfd9dc6513244f220d69faea')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
# http://sourceforge.net/tracker/index.php?func=detail&aid=3250304&group_id=12694&atid=112694
|
|
patch -p1 -i "$srcdir/libnl32.patch"
|
|
autoreconf -f -i
|
|
|
|
PYTHONPROG=/usr/bin/python2 ./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--enable-ucd-snmp-compatibility \
|
|
--enable-ipv6 \
|
|
--without-libwrap \
|
|
--with-python-modules \
|
|
--with-default-snmp-version="3" \
|
|
--with-sys-contact="root@localhost" \
|
|
--with-sys-location="Unknown" \
|
|
--with-logfile="/var/log/snmpd.log" \
|
|
--with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \
|
|
--with-persistent-directory="/var/net-snmp" \
|
|
--disable-static
|
|
make NETSNMP_DONT_CHECK_VERSION=1
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in
|
|
make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install
|
|
|
|
# install service files
|
|
install -Dm0644 "${srcdir}/snmpd.service" "${pkgdir}/usr/lib/systemd/system/snmpd.service"
|
|
|
|
# install config file
|
|
install -Dm0644 "${srcdir}/snmpd.confd" "${pkgdir}/etc/conf.d/snmpd"
|
|
|
|
# install license
|
|
install -Dm0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
|
}
|