summaryrefslogtreecommitdiffstats
path: root/perl/perl-Config-Find/perl-Config-Find.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-Config-Find/perl-Config-Find.SlackBuild')
-rw-r--r--perl/perl-Config-Find/perl-Config-Find.SlackBuild44
1 files changed, 26 insertions, 18 deletions
diff --git a/perl/perl-Config-Find/perl-Config-Find.SlackBuild b/perl/perl-Config-Find/perl-Config-Find.SlackBuild
index b24e599e05..cc99307e15 100644
--- a/perl/perl-Config-Find/perl-Config-Find.SlackBuild
+++ b/perl/perl-Config-Find/perl-Config-Find.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Config-Find
@@ -22,22 +22,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - make this noarch, since there's no compiled code.
+# - fix build if perl-Test-Pod is installed.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perl-Config-Find
VERSION=${VERSION:-0.26}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+ARCH=noarch
SRCNAM="$( echo $PRGNAM | cut -d- -f2- )"
-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}
@@ -51,11 +55,17 @@ 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+# 20220301 bkw: permissions are most bletcherous, don't revert to template.
+find . -type f -exec chmod 644 {} \+
+find . -type d -exec chmod 755 {} \+
+
+# 20220301 bkw: if perl-Test-POD was installed, the test "t/3_pods.t" was
+# failing, because the .pm files didn't specify an encoding for the
+# embedded POD docs, and there's a non-ASCII character in the author's
+# name in every file. The easy way to fix it would have been:
+# rm -f t/3_pods.t
+# but the *correct* fix is to do this:
+sed -i '2i\\n=encoding latin1\n\n=cut\n\n' lib/Config/Find{/*,.pm}
perl Makefile.PL \
PREFIX=/usr \
@@ -64,9 +74,7 @@ perl Makefile.PL \
make
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
+gzip $PKG/usr/man/man*/*
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
@@ -80,4 +88,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