1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
#!/bin/sh
# Slackware Build Script for xmltv_prereq
# Copyright 2006-2007 David Somero (dsomero@hotmail.com)
# 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
ARCH=noarch
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=${TMP}/package-${PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
set -e # Exit on most errors
## 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
"
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 .
export PERL5LIB=$PKG/usr/lib/perl5/vendor_perl/5.8.8
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
perl Makefile.PL --mech-dump
else
perl Makefile.PL -n
fi
make
make pure_vendor_install DESTDIR=$PKG/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION/README.$MODULE || true
) || exit 1 ; done
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
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|