2010-05-11 22:54:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-04-10 17:30:14 +02:00
|
|
|
# Slackware build script for perl-xml-libxml
|
2010-05-11 22:54:22 +02:00
|
|
|
|
|
|
|
# Written by Murat D. Kadirov <banderols@gmail.com>
|
|
|
|
|
|
|
|
PRGNAM=perl-xml-libxml
|
2011-04-10 17:30:14 +02:00
|
|
|
VERSION=1.70
|
|
|
|
BUILD=${BUILD:-1}
|
2010-05-11 22:54:22 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2011-04-10 17:30:14 +02:00
|
|
|
SRCNAM=XML-LibXML
|
|
|
|
|
2010-06-04 07:09:52 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) 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 .
|
|
|
|
|
2011-04-10 17:30:14 +02:00
|
|
|
perl Makefile.PL \
|
|
|
|
SKIP_SAX_INSTALL=1 \
|
|
|
|
PREFIX=/usr \
|
|
|
|
INSTALLDIRS=vendor \
|
2010-05-12 17:42:01 +02:00
|
|
|
INSTALLVENDORMAN1DIR=/usr/man/man1 \
|
|
|
|
INSTALLVENDORMAN3DIR=/usr/man/man3
|
2011-04-10 17:30:14 +02:00
|
|
|
make
|
|
|
|
make test
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
|
|
|
|
|
|
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
|
2010-05-12 17:42:01 +02:00
|
|
|
|
2011-04-10 17:30:14 +02:00
|
|
|
find $PKG -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
|
2010-05-11 22:54:22 +02:00
|
|
|
|
2011-04-10 17:30:14 +02:00
|
|
|
find $PKG -depth -type d -empty -delete || true
|
2010-05-11 22:54:22 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2011-04-10 17:30:14 +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}
|