diff options
Diffstat (limited to 'source/n/net-snmp/net-snmp.SlackBuild')
-rwxr-xr-x | source/n/net-snmp/net-snmp.SlackBuild | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/source/n/net-snmp/net-snmp.SlackBuild b/source/n/net-snmp/net-snmp.SlackBuild index a138c357..2582c2f9 100755 --- a/source/n/net-snmp/net-snmp.SlackBuild +++ b/source/n/net-snmp/net-snmp.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=net-snmp VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-6} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -63,6 +63,8 @@ else LIBDIRSUFFIX="" fi +NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "} + cd $TMP rm -rf ${PKGNAM}-${VERSION} tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1 @@ -76,23 +78,12 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -zcat $CWD/net-snmp-5.7.2-pie.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-dir-fix.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/net-snmp-5.8-multilib.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-test-debug.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.7.2-autoreconf.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-agentx-disconnect-crash.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/net-snmp-5.7.2-cert-path.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-cflags.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/net-snmp-5.8-Remove-U64-typedef.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-libnetsnmptrapd-against-MYSQL_LIBS.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/net-snmp-5.7.3-iterator-fix.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/net-snmp-5.8-autofs-skip.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/net-snmp-5.8-modern-rpm-api.patch.gz | patch -p1 --verbose || exit 1 -# Not sure about this one? -#zcat $CWD/net-snmp-5.8-python3.patch.gz | patch -p1 --verbose || exit 1 - # Fix destdir for python modules #sed -i "s|\$(PYMAKE) install|\$(PYMAKE) install --root=$PKG|" \ # Makefile.in @@ -123,8 +114,7 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux || exit 1 # Build and install: -# This seems to not play well with "-j N"... -make INSTALLDIRS=vendor || exit 1 +make $NUMJOBS INSTALLDIRS=vendor || exit 1 make install INSTALLDIRS=vendor DESTDIR=$PKG || exit 1 # Don't ship .la files: @@ -137,8 +127,6 @@ if [ -d $PKG/usr/share/man/man3 ]; then rmdir $PKG/usr/share/man/man3 $PKG/usr/share/man fi mkdir -p $PKG/usr -mv $PKG/usr/share/man $PKG/usr - mkdir -p $PKG/var/lib/net-snmp/{cert,mib}_indexes mkdir -p $PKG/etc/snmp zcat $CWD/snmpd.conf.gz > $PKG/etc/snmp/snmpd.conf.new @@ -188,7 +176,7 @@ done # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - AGENT.txt CHANGES COPYING* CodingStyle EXAMPLE* FAQ \ + AGENT* CHANGES ChangeLog COPYING* CodingStyle EXAMPLE* FAQ \ INSTALL NEWS PORTING README* TODO \ $PKG/usr/doc/${PKGNAM}-$VERSION @@ -200,6 +188,14 @@ if [ -r ChangeLog ]; then touch -r ChangeLog $DOCSDIR/ChangeLog fi +# If there's a CHANGES file, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGES ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES + touch -r CHANGES $DOCSDIR/CHANGES +fi + mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc |