2010-05-11 20:01:06 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Slackware Build Script for xmltv_prereq
|
|
|
|
|
2010-05-12 17:42:19 +02:00
|
|
|
# Copyright 2006-2009 David Somero (dsomero@hotmail.com) Athens,TN USA
|
2010-05-11 20:01:06 +02:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use of this script, with or without modification, is
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
PRGNAM=xmltv_prereq
|
|
|
|
VERSION=8
|
2010-05-13 00:33:56 +02:00
|
|
|
BUILD=${BUILD:-1}
|
2010-05-11 20:01:06 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-11 22:24:27 +02:00
|
|
|
|
2010-06-04 07:10:41 +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 20:01:06 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=${TMP}/package-${PRGNAM}
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
## List of modules to compile
|
|
|
|
MODULES="
|
|
|
|
00_Class-MethodMaker-2.09
|
|
|
|
00_HTML-Tagset-3.10
|
|
|
|
00_TermReadKey-2.30
|
|
|
|
00_Tk-804.027
|
|
|
|
00_XML-LibXML-Common-0.13
|
|
|
|
00_XML-NamespaceSupport-1.09
|
|
|
|
01_HTML-Parser-3.56
|
|
|
|
01_XML-SAX-0.15
|
|
|
|
01_libwww-perl-5.805
|
|
|
|
DateManip-5.44
|
|
|
|
HTML-TableExtract-2.10
|
|
|
|
HTML-Tree-3.23
|
|
|
|
Lingua-EN-Numbers-Ordinate-1.02
|
|
|
|
Lingua-Preferred-0.2.4
|
|
|
|
PerlIO-gzip-0.18
|
|
|
|
SOAP-Lite-0.69
|
|
|
|
Term-ProgressBar-2.09
|
|
|
|
Tk-TableMatrix-1.23
|
|
|
|
Unicode-String-2.09
|
|
|
|
XML-LibXML-1.62
|
|
|
|
XML-Twig-3.29
|
|
|
|
XML-Writer-0.602
|
|
|
|
WWW-Mechanize-1.20
|
|
|
|
"
|
|
|
|
|
2010-05-12 17:42:19 +02:00
|
|
|
set -e
|
|
|
|
|
2010-05-11 20:01:06 +02:00
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
2010-05-13 00:33:56 +02:00
|
|
|
eval $(perl '-V:vendorlib')
|
|
|
|
export PERL5LIB+=$PKG/$vendorlib
|
2010-05-11 20:01:06 +02:00
|
|
|
|
|
|
|
for MODULE in $MODULES ; do
|
|
|
|
( cd $MODULE
|
|
|
|
if [ "$MODULE" = "00_Class-MethodMaker-2.09" ]; then
|
|
|
|
perl Makefile.PL
|
|
|
|
elif [ "$MODULE" = "WWW-Mechanize-1.20" ]; then
|
2010-05-11 22:24:27 +02:00
|
|
|
perl Makefile.PL --mech-dump
|
2010-05-11 20:01:06 +02:00
|
|
|
else
|
2010-05-11 22:24:27 +02:00
|
|
|
perl Makefile.PL -n
|
2010-05-11 20:01:06 +02:00
|
|
|
fi
|
|
|
|
make
|
2010-05-11 22:24:27 +02:00
|
|
|
make pure_vendor_install DESTDIR=$PKG/
|
2010-05-11 20:01:06 +02:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-11 22:24:27 +02:00
|
|
|
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION/README.$MODULE || true
|
|
|
|
) || exit 1 ; done
|
2010-05-11 20:01:06 +02:00
|
|
|
|
|
|
|
mv $PKG/usr/share/man $PKG/usr
|
|
|
|
rmdir $PKG/usr/share
|
|
|
|
|
|
|
|
( cd $PKG/usr/man
|
|
|
|
find . -name "*.?" -type f 2> /dev/null | xargs gzip -9 2> /dev/null
|
|
|
|
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
|
|
|
|
)
|
|
|
|
|
|
|
|
# Remove perlocal.pod and .packlist from $PKG
|
|
|
|
( cd $PKG
|
|
|
|
find . -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f
|
|
|
|
)
|
|
|
|
|
|
|
|
cat README > $PKG/usr/doc/$PRGNAM-$VERSION/README
|
|
|
|
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:33:56 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|