summaryrefslogtreecommitdiffstats
path: root/perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild')
-rw-r--r--perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild49
1 files changed, 30 insertions, 19 deletions
diff --git a/perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild b/perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild
index 331f868821..29f113ec91 100644
--- a/perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild
+++ b/perl/perl-SNMP-Info/perl-SNMP-Info.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perl-SNMP-Info
-# Copyright 2013, Thibaut Notteboom, Paris, FRANCE
+# Copyright 2013-2023, Thibaut Notteboom, Paris, FRANCE
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,28 +22,35 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perl-SNMP-Info
-VERSION=${VERSION:-3.08}
+VERSION=${VERSION:-3.95}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM="$(printf $PRGNAM | cut -d- -f2-)"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -51,6 +58,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -66,18 +76,19 @@ tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-perl Makefile.PL \
- PREFIX=/usr \
- INSTALLDIRS=vendor \
- INSTALLVENDORMAN3DIR=/usr/man/man3
-make
-make test
-make install DESTDIR=$PKG
+perl Build.PL \
+ --installdirs vendor \
+ --config installvendorman1dir=/usr/man/man1 \
+ --config installvendorman3dir=/usr/man/man3
+./Build
+./Build test
+./Build install \
+ --destdir $PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -88,7 +99,7 @@ find $PKG -depth -type d -empty -delete || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COPYRIGHT ChangeLog DEVELOP MANIFEST README \
+ Changes LICENSE MANIFEST README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -96,4 +107,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE