blob: 5dd861be0baaf0964fdb415da89db555713398ba (
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
|
#!/bin/sh
# Slackware build script for kompozer
# Written by Giovanne Castro <giovannefc@ig.com.br>
PRGNAM=kompozer
VERSION=${VERSION:-0.8b3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# No flags/configure needed as it is just a binary repackaging.
ARCH=i686
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# This should allow you to either pass a different value of KOMPOZERLANG
# when you run the script (KOMPOZERLANG=pt-BR ./kompozer.SlackBuild for
# example) or change it in this script. Note that you will need to have
# the correct tarball in the build directory for this to work...
# You can get localized tarballs from the following location:
# http://sourceforge.net/projects/kompozer/files/
KOMPOZERLANG=${KOMPOZERLANG:-en-US}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
# Copy kompozer libraries
mkdir -p $PKG/usr/lib
( cd $PKG/usr/lib
tar xvf $CWD/kompozer-$VERSION.$KOMPOZERLANG.gcc4.2-$ARCH.tar.gz || exit 1
mv kompozer kompozer-$VERSION
ln -sf kompozer-$VERSION kompozer
cd kompozer-$VERSION
sed -i -e "s/usr\/local/usr/" kompozer
cd $PKG/usr/lib/kompozer-$VERSION ) || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Create link to executable
mkdir -p $PKG/usr/bin
( cd $PKG/usr/bin
ln -sf /usr/lib/kompozer-$VERSION/kompozer .
) || exit 1
# Install icons
mkdir -p $PKG/usr/share/applications
cp -a $CWD/kompozer.desktop $PKG/usr/share/applications/mozilla-kompozer.desktop
mkdir -p $PKG/usr/share/pixmaps
cp -a $CWD/kompozer.png $PKG/usr/share/pixmaps/kompozer.png
# Move and copy documentation to correct place
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/lib/kompozer-$VERSION/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/lib/kompozer-$VERSION/bloaturls.txt $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/lib/kompozer-$VERSION/install.log $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/lib/kompozer-$VERSION/dependentlibs.list $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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|