2010-05-11 22:54:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for perl-xml-namespacesupport
|
|
|
|
|
|
|
|
# Written by Murat D. Kadirov <banderols@gmail.com>
|
|
|
|
|
|
|
|
PRGNAM=perl-xml-libxml
|
|
|
|
SRCNAM=XML-LibXML
|
|
|
|
VERSION=1.64
|
2010-05-12 17:42:01 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2010-05-11 22:54:22 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-06-04 07:09:52 +02:00
|
|
|
# Automatically determine the architecture we're building on:
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-11 22:54:22 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2010-05-12 17:42:01 +02:00
|
|
|
set -e
|
2010-05-11 22:54:22 +02:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
2010-05-12 17:42:01 +02:00
|
|
|
cd $TMP
|
2010-05-11 22:54:22 +02:00
|
|
|
rm -rf $SRCNAM-$VERSION
|
2010-05-12 17:42:01 +02:00
|
|
|
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
|
|
|
|
cd $SRCNAM-$VERSION
|
2010-05-11 22:54:22 +02:00
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
2010-05-12 17:42:01 +02:00
|
|
|
perl Makefile.PL
|
|
|
|
make \
|
|
|
|
INSTALLVENDORMAN1DIR=/usr/man/man1 \
|
|
|
|
INSTALLVENDORMAN3DIR=/usr/man/man3
|
|
|
|
make \
|
|
|
|
INSTALLVENDORMAN1DIR=/usr/man/man1 \
|
|
|
|
INSTALLVENDORMAN3DIR=/usr/man/man3 \
|
|
|
|
install_vendor \
|
|
|
|
DESTDIR=$PKG
|
|
|
|
|
|
|
|
( cd $PKG/usr/man || exit 1
|
|
|
|
find . -type f -exec gzip -9 {} \;
|
|
|
|
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
|
|
|
|
)
|
2010-05-13 00:32:57 +02:00
|
|
|
( cd $PKG
|
|
|
|
find . -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f
|
|
|
|
)
|
2010-05-11 22:54:22 +02:00
|
|
|
|
|
|
|
# Remove empty directories
|
|
|
|
find $PKG -depth -type d -empty -exec rm -rf {} \;
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-12 17:42:01 +02:00
|
|
|
cp -a Changes LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-11 22:54:22 +02:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:32:57 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|