summaryrefslogtreecommitdiffstats
path: root/perl/perl-Test-Exception/perl-Test-Exception.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-Test-Exception/perl-Test-Exception.SlackBuild')
-rw-r--r--perl/perl-Test-Exception/perl-Test-Exception.SlackBuild48
1 files changed, 21 insertions, 27 deletions
diff --git a/perl/perl-Test-Exception/perl-Test-Exception.SlackBuild b/perl/perl-Test-Exception/perl-Test-Exception.SlackBuild
index 566f8d54bf..548bf216bc 100644
--- a/perl/perl-Test-Exception/perl-Test-Exception.SlackBuild
+++ b/perl/perl-Test-Exception/perl-Test-Exception.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware Package Build Script for perl modules: Test::Exception
# Home Page https://metacpan.org/release/Test-Exception
@@ -25,36 +25,33 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230702 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - ARCH=noarch.
+# - add missing SlackBuild to doc dir.
+# - fix doc permissions (Changes was +x).
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM="perl-Test-Exception"
VERSION=${VERSION:-0.43}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+ARCH=noarch
SRCNAM="$(printf $PRGNAM | cut -f2- -d-)"
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
+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}
set -e
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
-fi
-
DOCS="Changes"
rm -fr $TMP/$SRCNAM-$VERSION $PKG
@@ -63,11 +60,7 @@ cd $TMP
tar xzvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $TMP/$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 . -type f -exec chmod 644 {} + -o -type d -exec chmod 755 {} +
CFLAGS="$SLKCFLAGS" \
perl Makefile.PL \
@@ -77,11 +70,12 @@ perl Makefile.PL \
make
make install DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a $DOCS $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
# Remove perlocal.pod and .packlist from $PKG ; remove empty directories
find $PKG -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f
@@ -91,4 +85,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