mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
60 lines
1.4 KiB
Bash
60 lines
1.4 KiB
Bash
#!/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
|
|
ARCH=${ARCH:-i486}
|
|
BUILD=${BUILD:-2}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
CWD=$(pwd)
|
|
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 .
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
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
|
|
)
|
|
( cd $PKG
|
|
find . -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f
|
|
)
|
|
|
|
# Remove empty directories
|
|
find $PKG -depth -type d -empty -exec rm -rf {} \;
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cp -a Changes LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
|
|
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
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|