slackbuilds_ponce/libraries/perl-xml-libxml/perl-xml-libxml.SlackBuild
2010-05-12 17:42:01 +02:00

63 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=noarch
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
)
# Remove perlocal.pod and .packlist from $PKG
( for i in perllocal.pod .packlist; do
find $PKG -name "$i" -exec rm -f {} \;
done
) || exit 1
# 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.tgz