summaryrefslogtreecommitdiff
path: root/network/flock/flock.SlackBuild
blob: 4f776a6ddc73f84e540cd9733559cd5cc531bd02 (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
#!/bin/sh

# This script is a modified version of what is available on 
# slackware-12.1/source/xap/mozilla-firefox/
# 
# Modified by Vincent Batts, vbatts@gmail.com 

PRGNAM="flock"
VERSION=2.5
ARCH=${ARCH:-i686}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

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

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT

mkdir -p $PKG/usr/lib
cd $PKG/usr/lib
  tar xvf $CWD/${PRGNAM}-$VERSION.en-US.linux-i686.tar.bz2
  chown -R root:root .
  mv ${PRGNAM} $PRGNAM-$VERSION
  ln -sf $PRGNAM-$VERSION ${PRGNAM}
  cd $PRGNAM-$VERSION
  zcat $CWD/$PRGNAM-simple.diff.gz | patch -p0 
  zcat $CWD/$PRGNAM-thunderbird.diff.gz | patch -p0
  zcat $CWD/$PRGNAM.moz_plugin_path.diff.gz | patch -p0
  rm -f defaults/pref/$PRGNAM.js.orig
  mv ${PRGNAM}-browser ${PRGNAM}
cd -

mkdir -p $PKG/usr/bin
( cd $PKG/usr/bin
  ln -sf /usr/lib/$PRGNAM-$VERSION/${PRGNAM} $PRGNAM-bin
)

mkdir -p $PKG/usr/lib/mozilla/plugins

mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop

mkdir -p $PKG/usr/share/pixmaps
cat $CWD/${PRGNAM}.png > $PKG/usr/share/pixmaps/$PRGNAM.png

# These files/directories are usually created if Flock is run as root, which on many
# systems might (and possibly should) be never.  Therefore, if we don't see them we'll
# put stubs in place to prevent startup errors.
cd $PKG/usr/lib/$PRGNAM-$VERSION
  if [ -d extensions/talkback\@mozilla.org ]; then
    if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
      echo > extensions/talkback\@mozilla.org/chrome.manifest
    fi
  fi
  if [ ! -d updates ]; then
    mkdir -p updates/0
  fi
cd -

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp $PKG/usr/lib/$PRGNAM-$VERSION/README.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

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.tgz