2021-07-04 01:48:15 +08:00
|
|
|
#!/bin/bash
|
2010-07-26 07:10:44 +08:00
|
|
|
|
|
|
|
# Slackware build script for perl-AppConfig
|
|
|
|
# Written by Thomas Morper <thomas@beingboiled.info>
|
|
|
|
|
2021-07-04 17:41:06 +08:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2020-01-03 15:44:20 +08:00
|
|
|
PRGNAM=perl-AppConfig
|
2015-03-04 20:33:15 +08:00
|
|
|
VERSION=${VERSION:-1.71}
|
2010-07-26 07:10:44 +08:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 18:23:38 +08:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2010-07-26 07:10:44 +08:00
|
|
|
|
2020-01-03 15:44:20 +08:00
|
|
|
SRCNAM=AppConfig
|
|
|
|
|
2010-07-26 07:10:44 +08:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2017-03-22 08:41:20 +08:00
|
|
|
i?86) ARCH=i586 ;;
|
2010-07-26 07:10:44 +08:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2021-07-04 18:23:38 +08:00
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
|
|
# the name of the created package would be, and then exit. This information
|
|
|
|
# could be useful to other scripts.
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2010-07-26 07:10:44 +08:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $SRCNAM-$VERSION
|
|
|
|
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
|
|
|
|
cd $SRCNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2013-11-22 15:37:19 +08:00
|
|
|
find -L . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
2010-07-26 07:10:44 +08:00
|
|
|
-exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \;
|
|
|
|
|
|
|
|
perl Makefile.PL \
|
|
|
|
PREFIX=/usr \
|
|
|
|
INSTALLDIRS=vendor \
|
|
|
|
INSTALLVENDORMAN1DIR=/usr/man/man1 \
|
|
|
|
INSTALLVENDORMAN3DIR=/usr/man/man3
|
|
|
|
|
|
|
|
make
|
2015-02-07 23:32:58 +08:00
|
|
|
#make test - depends on Test::Pod and more sub-dependencies
|
2010-07-26 07:10:44 +08:00
|
|
|
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
|
|
|
|
|
|
|
|
find $PKG -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" -empty | xargs rm -f || true
|
|
|
|
find $PKG -depth -type d -empty -delete || true
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a \
|
|
|
|
Changes LICENSE MANIFEST README TODO \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 18:23:38 +08:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|