blob: 7e2faac2bf39ce348c30342e2c1c30dc2ef5bca8 (
plain)
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
|
#!/bin/sh
# Slackware build script for libpng-legacy12
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=libpng-legacy12
VERSION=${VERSION:-1.2.57}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
UPSTREAM_VER=${UPSTREAM_VER:-1.4.20}
UPSTREAM_BUILD=${UPSTREAM_BUILD:-1}
UPSTREAM_TAG=${UPSTREAM_TAG:-_slack14.1}
# N.B. do NOT change i486 to i586 here, since this is a repack
# of a Slack 14.1 package.
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# We reset ARCH to i486 if it's i586 or i686, to match Slack 14.1's ARCH.
case "$ARCH" in
i?86) LIBDIRSUFFIX=""; ARCH=i486 ;;
x86_64) LIBDIRSUFFIX="64" ;;
*) echo "Warning: unrecognized ARCH '$ARCH'" ;;
esac
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
UPSTREAM=libpng-$UPSTREAM_VER-$ARCH-$UPSTREAM_BUILD$UPSTREAM_TAG
set -e
rm -rf $PKG
mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
rm -rf $TMP/$PRGNAM
mkdir -p $TMP/$PRGNAM
cd $TMP/$PRGNAM
tar xvf $CWD/$UPSTREAM.txz
# Include only the shared lib, plus SBo-specific docs.
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX
cp -a \
./usr/lib$LIBDIRSUFFIX/libpng12.so.*.*.* \
./usr/lib$LIBDIRSUFFIX/libpng12.la \
$PKG/usr/lib$LIBDIRSUFFIX
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# make our doinst.sh from upstream's
grep libpng12.so ./install/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|