summaryrefslogtreecommitdiff
path: root/multimedia/divx4linux/divx4linux.SlackBuild
blob: 8af7a48714e00a92e3debc6a53578efb4de42752 (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
#!/bin/sh

# Slackware build script for divx4linux
# Written by Jonathan Yu <yumigator [at] moldysoup [dot] com>

# Adapted from install.sh included with package
# Slightly modified by the SlackBuilds.org project
set -e # Exit on most errors

PRGNAM=divx4linux
VERSION=20020418
ARCH=${ARCH:-i386} # binary package, do not change
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION

# Building package from binaries; no compiling necessary
mkdir -p $PKG/usr/{lib,include}
cp -f libdivx{de,en}core.so $PKG/usr/lib/
cp -f {decore,encore2}.h $PKG/usr/include/
chown root.root $PKG/usr/lib/libdivx{en,de}core.so
chmod 755 $PKG/usr/lib/libdivx{en,de}core.so
rm -f $PKG/usr/lib/libdivx{en,de}core.so.0
ln -s libdivxencore.so $PKG/usr/lib/libdivxencore.so.0
ln -s libdivxdecore.so $PKG/usr/lib/libdivxdecore.so.0
chown root.root $PKG/usr/include/{decore,encore2}.h

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp "DivX MPEG-4 Codec and Its Interface.pdf" $PKG/usr/doc/$PRGNAM-$VERSION/
cp RELNOTES.linux $PKG/usr/doc/$PRGNAM-$VERSION/
chmod -x "$PKG/usr/doc/$PRGNAM-$VERSION/DivX MPEG-4 Codec and Its Interface.pdf"
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 $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz