summaryrefslogtreecommitdiff
path: root/games/chromium/chromium.SlackBuild
blob: 906b88c0ae09ee10afc2fdf35d6c56a87848e0a5 (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
#!/bin/sh

# Slackware build script for Chromium B.S.U.
# Written by Erik Hanson  erik@slackbuilds.org

PRGNAM=chromium
VERSION=0.9.12
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

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

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP 
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Patch the hell out of this old dog, courtesy debian.
for patch in $CWD/patches/* ; do patch -p1 < $patch || exit 1 ; done

CFLAGS="$SLKCFLAGS" \
./configure --disable-setup || exit 1

make || exit 1

# Manual installation
mkdir -p $PKG/usr/{games,share/{games/chromium,pixmaps,applications},man/man6}
/usr/bin/ginstall -s -m 755 bin/chromium $PKG/usr/games
/usr/bin/ginstall -m 644 $CWD/chromium.xpm $PKG/usr/share/pixmaps
/usr/bin/ginstall -m 644 $CWD/chromium.6.gz $PKG/usr/man/man6
cp -a data/fonts data/png data/wav $PKG/usr/share/games/chromium/

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html $PKG/install
cp -a AUTHORS CHANGES INSTALL LICENSE README README.vorbis \
  $PKG/usr/doc/$PRGNAM-$VERSION
cp -a data/doc/* $PKG/usr/doc/$PRGNAM-$VERSION/html
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/chromium.desktop > $PKG/usr/share/applications/chromium.desktop
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

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