aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmpfile <tmpfile@users.noreply.github.com>2017-05-14 11:38:18 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-07 19:10:57 +0000
commit5dee66641ebb81f56486be12c4cbb4edf40642a3 (patch)
treef752e044de9538d6397cfa703a1d01aa5b668f21
parentd82e87f59302ab28d621295d588b9d3d082668ed (diff)
downloadaports-5dee66641ebb81f56486be12c4cbb4edf40642a3.tar.bz2
aports-5dee66641ebb81f56486be12c4cbb4edf40642a3.tar.xz
main/net-snmp: modernize abuild
-rw-r--r--main/net-snmp/APKBUILD70
1 files changed, 18 insertions, 52 deletions
diff --git a/main/net-snmp/APKBUILD b/main/net-snmp/APKBUILD
index ddfa9e3267..6dbc7c9d49 100644
--- a/main/net-snmp/APKBUILD
+++ b/main/net-snmp/APKBUILD
@@ -26,28 +26,18 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
snmptrapd.confd
"
-_builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- local i
- cd "$_builddir"
- update_config_sub || return 1
- for i in $source; do
- case $i in
- *.patch|*.diff)
- msg "Applying $i..."
- patch -p1 -i "$srcdir"/$i || return 1
- ;;
- esac
- done
-
+ update_config_sub
+ default_prepare
# Allow tmpfs volume size monitoring
# Ref #932
sed -e 's#"tmpfs",#/* "tmpfs", */#g' -i agent/mibgroup/host/hr_filesys.c
}
build() {
- cd "$_builddir"
+ cd "$builddir"
export lt_cv_sys_max_cmd_len=8192
@@ -73,15 +63,14 @@ build() {
--enable-shared \
--enable-as-needed \
--with-perl-modules="INSTALLDIRS=vendor" \
- --disable-embedded-perl \
- || return 1
+ --disable-embedded-perl
# embedded-perl seems to create TEXTREL's
- make -j1 || return 1
+ make -j1
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
# remove things we dont want distribute
rm "$pkgdir"/usr/lib/libsnmp* \
@@ -89,17 +78,14 @@ package() {
"$pkgdir"/usr/bin/fixproc \
"$pkgdir"/usr/share/man/man1/fixproc* \
"$pkgdir"/usr/bin/ipf-mod.pl \
- "$pkgdir"/usr/bin/snmpinform \
- || return 1
- ln -s snmptrap "$pkgdir"/usr/bin/snmpinform || return 1
-
- install -m755 -D "$srcdir"/snmpd.initd "$pkgdir"/etc/init.d/snmpd \
- || return 1
- ln -s snmpd "$pkgdir"/etc/init.d/snmptrapd || return 1
- install -m644 -D "$srcdir"/snmpd.confd "$pkgdir"/etc/conf.d/snmpd \
- || return 1
+ "$pkgdir"/usr/bin/snmpinform
+ ln -s snmptrap "$pkgdir"/usr/bin/snmpinform
+
+ install -m755 -D "$srcdir"/snmpd.initd "$pkgdir"/etc/init.d/snmpd
+ ln -s snmpd "$pkgdir"/etc/init.d/snmptrapd
+ install -m644 -D "$srcdir"/snmpd.confd "$pkgdir"/etc/conf.d/snmpd
install -m644 -D "$srcdir"/snmptrapd.confd \
- "$pkgdir"/etc/conf.d/snmptrapd || return 1
+ "$pkgdir"/etc/conf.d/snmptrapd
install -m644 -D EXAMPLE.conf "$pkgdir"/etc/snmp/snmpd.conf
echo "authCommunity log,execute,net public" > "$pkgdir"/etc/snmp/snmptrapd.conf
mkdir -p "$pkgdir"/var/lib/net-snmp
@@ -109,10 +95,9 @@ package() {
libs() {
pkgdesc="The NET-SNMP runtime client libraries"
replaces="net-snmp"
- mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share/snmp || return 1
- mv "$pkgdir"/usr/lib/libnetsnmp.so.* "$subpkgdir"/usr/lib/ || return 1
- mv "$pkgdir"/usr/share/snmp/mibs "$subpkgdir"/usr/share/snmp/ \
- || return 1
+ mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share/snmp
+ mv "$pkgdir"/usr/lib/libnetsnmp.so.* "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/share/snmp/mibs "$subpkgdir"/usr/share/snmp/
}
alibs() {
@@ -138,7 +123,7 @@ pl() {
"$pkgdir"/usr/bin/snmp-bridge-mib \
"$pkgdir"/usr/bin/net-snmp-cert \
"$pkgdir"/usr/bin/traptoemail \
- "$subpkgdir"/usr/bin/ || return 1
+ "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/perl* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/share/snmp/mib2c* \
"$pkgdir"/usr/share/snmp/*.pl \
@@ -159,25 +144,6 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}
-
-md5sums="d4a3459e1577d0efa8d96ca70a885e53 net-snmp-5.7.3.tar.gz
-4fd189ec7154114c9bd19f2b0058ae9c netsnmp-swinst-crash.patch
-0fe11859a55f8e2489d5de629971a242 fix-includes.patch
-2267947dd243b4fa85a3cf0c23dbaa76 CVE-2015-5621.patch
-552b6e2ebfab53647b9f876cc87fba02 remove-U64-typedef.patch
-c8d48a41e3a46890fb4d8cc85d62ebb0 fix-Makefile-PL.patch
-b6621a2e8d6299874cc3589026f1d0cb snmpd.initd
-c7658acd05090f52c6a9e4b195d65b01 snmpd.confd
-8095341bc4bb23bfc3be1d7e2d51bb4f snmptrapd.confd"
-sha256sums="12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0 net-snmp-5.7.3.tar.gz
-2de23959acf74d8f893129819149d016cc22f2d60e15f875e4d17de33931013e netsnmp-swinst-crash.patch
-7528f7d368a0a4536915805c065f8496c37cb99dbc74d508bed89831cd5af37e fix-includes.patch
-4cfe532b39877d90836d04079ab7bff14727719e8ca719ead9d615b21cade255 CVE-2015-5621.patch
-b64c2fb03954802a1da72a32f36b120c1f63c508a04ed3010f337dd2df659749 remove-U64-typedef.patch
-6546279739f7d3988614deb25a9a35875b7b3f7063d01173c0e65802bc2ea8dd fix-Makefile-PL.patch
-faa6f7de3e9e4b6606668b1c064b61977c095f7c95a5ca8aaaf46bcd9116f3f9 snmpd.initd
-21ced816652de3dbae04970db8e465ffb119a2a0c1bddf9f12867d1c81eb0aac snmpd.confd
-2ff4dc5a94a3b78aeb88c85dc94e55bf01ef342cf02d536b5c71bb6654a9c025 snmptrapd.confd"
sha512sums="0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb net-snmp-5.7.3.tar.gz
4ad92f50b14d5e27ba86256cc532a2dd055502f4d5fbb1700434f9f01f881fd09bb1eadb94e727554e1470f036707558314c64a66d0376b54e71ab31d5e4baa3 netsnmp-swinst-crash.patch
87a552bd2e41684bba6e87fbcf6454a85ee912d7a339411fda24cebddf7661f0856729e076a917920a542cf84b687ffd90a091daa15f2c48f0ff64f3a53c0ddb fix-includes.patch