blob: c8f78999f3f917a9d0f6cfdf2d0775d48ebf7b97 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#!/bin/sh
## Written by hollywoodb (hollywoodb@fastmail.fm)
# Modified by the SlackBuilds.org project
# Script maintained by Robby Workman <rworkman@slackbuilds.org>
PRGNAM=flash-player-plugin
VERSION=10.0_r45
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SRC_VERSION=10.0.45.2
# Automatically determine the architecture we're building on:
case "$( uname -m )" in
i?86) ARCH=i386 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
# If you use or intend to use Opera at some point, and you want
# this plugin available to it, then pass "yes" as the value to this
# variable: USE_OPERA=yes ./flash-player-plugin.SlackBuild
# Note that this should *NOT* be needed if you installed Opera using
# the SlackBuilds.org build script, as we do a simple patch there to
# make it look in /usr/lib${LIBDIRSUFFIX}/mozilla/plugins
USE_OPERA=${USE_OPERA:-no}
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
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
tar xvf $CWD/libflashplayer-${SRC_VERSION}.linux-x86_64.so.tar.gz
elif [ "$ARCH" = "i386" ]; then
LIBDIRSUFFIX=""
tar xvf $CWD/install_flash_player_10_linux.tar.gz
else
printf "\n\n$ARCH is unsupported...\n"
exit 1
fi
# Check to make sure we're packaging the same version that this script
# was written to handle:
_REALVERS=$(strings libflashplayer.so | grep -e "^Shockwave Flash [.\d+]*" | sed -e "s/Shockwave Flash //g")
if [ ! "$(echo $_REALVERS | tr ' ' _)" = "$(echo $VERSION)" ]; then
echo
echo "This build script was written for a different version of the"
echo "flash plugin than you have downloaded. This is probably due"
echo "to Adobe changing the upstream tarball - they don't have"
echo "versioned tarballs - and it's almost certainly nothing to be"
echo "concerned about. However, if this package doesn't build or"
echo "work as expected, contact the SlackBuilds.org project on our"
echo "users mailing list."
echo
sleep 5
fi
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
install -m 0755 libflashplayer.so $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
# If the user wants an opera plugin installed, then we'll do that too.
if [ ! "$USE_OPERA" = "no" ]; then
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/opera/plugins
cd $PKG/usr/lib${LIBDIRSUFFIX}/opera/plugins
ln -s /usr/lib${LIBDIRSUFFIX}/mozilla/plugins/libflashplayer.so .
cd -
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|