summaryrefslogtreecommitdiff
path: root/network/vuze/vuze.SlackBuild
blob: 85b9931f5003a1dfe21b7dfd089d5aea40203afb (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
#!/bin/sh

# Slackware build script for Azureus/Vuze
# Written by Chris Lawrence <selivanow@gmail.com>

PRGNAM=vuze
VERSION=${VERSION:-4.3.0.4}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}

if [ "$ARCH" = "x86_64" ]; then
  LIBDIRSUFFIX="64"
  ARCHIVE=Vuze_${VERSION}_linux-$ARCH.tar.bz2
else
  ARCH=i486
  LIBDIRSUFFIX=""
  ARCHIVE=Vuze_${VERSION}_linux.tar.bz2
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

rm -rf $PKG
mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX} $PKG/usr/bin $OUTPUT
tar xvf $CWD/$ARCHIVE -C $PKG/usr/lib${LIBDIRSUFFIX}

# Set PROGRAM_DIR and MOZILLA_FIVE_HOME in the azureus program script
sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%g" $CWD/vuze-set_paths.diff | \
    patch -p1 -d $PKG/usr/lib${LIBDIRSUFFIX}/vuze

# Create two new symlinks in /usr/bin
( cd $PKG/usr/bin
  ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/azureus
  ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/vuze
)

mkdir -p $PKG/usr/share/{applications,pixmaps}
cat $CWD/vuze.desktop > $PKG/usr/share/applications/vuze.desktop
( cd $PKG/usr/share/pixmaps ; ln -s ../../lib${LIBDIRSUFFIX}/vuze/vuze.png )

mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}