summaryrefslogtreecommitdiffstats
path: root/perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild')
-rw-r--r--perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild62
1 files changed, 26 insertions, 36 deletions
diff --git a/perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild b/perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild
index 5403f0b087..a0443019d1 100644
--- a/perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild
+++ b/perl/perl-WebService-MusicBrainz/perl-WebService-MusicBrainz.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perl-WebService-MusicBrainz
-# Copyright 2016-2019 Andreas Voegele <andreas@andreasvoegele.com>
+# Copyright 2016-2019 Andreas Voegele <email removed>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -16,40 +16,33 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# 20230105 bkw: update for v1.0.6.
+# 20220110 bkw:
+# - take over maintenance.
+# - ARCH=noarch.
+# - build option TESTS=yes to run 'make test'.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perl-WebService-MusicBrainz
-VERSION=${VERSION:-1.0.5}
+VERSION=${VERSION:-1.0.6}
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=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
+ARCH=noarch
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -59,26 +52,23 @@ rm -rf $SRCNAM-$VERSION
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 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
perl Makefile.PL \
INSTALLDIRS=vendor \
INSTALLVENDORMAN1DIR=/usr/man/man1 \
INSTALLVENDORMAN3DIR=/usr/man/man3
make
-# The test suite requires a network connection.
-#make test
-make 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
+# The test suite requires a network connection.
+[ "${TESTS:-no}" = "yes" ] && make test
-find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+make install DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | \
+ xargs rm -f || true
find $PKG -depth -type d -empty -delete || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -89,4 +79,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