summaryrefslogtreecommitdiff
path: root/office/gbgoffice/gbgoffice.SlackBuild
diff options
context:
space:
mode:
authorPetar Petrov <ppetrov@paju.oulu.fi>2011-10-21 14:08:25 -0200
committerNiels Horn <niels.horn@slackbuilds.org>2011-10-21 15:59:21 -0200
commit9034e05f4e08af3be1f451e8974d79e24a57cb40 (patch)
treee3d3d0f3ff23003b391510ad1e4f29d5ae7c0e99 /office/gbgoffice/gbgoffice.SlackBuild
parentaf348d087fe2bbc34592caf807982b6d4f8948a2 (diff)
downloadslackbuilds-9034e05f4e08af3be1f451e8974d79e24a57cb40.tar.gz
office/gbgoffice: Added (Bgoffice dictionary frontend)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'office/gbgoffice/gbgoffice.SlackBuild')
-rw-r--r--office/gbgoffice/gbgoffice.SlackBuild103
1 files changed, 103 insertions, 0 deletions
diff --git a/office/gbgoffice/gbgoffice.SlackBuild b/office/gbgoffice/gbgoffice.SlackBuild
new file mode 100644
index 0000000000..c4726e69e8
--- /dev/null
+++ b/office/gbgoffice/gbgoffice.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for gbgoffice
+# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
+# hereby submitted to the public domain
+
+# Based on the gbgoffice PKGBUILD from Archlinux AUR
+# (http://aur.archlinux.org/packages.php?ID=45316).
+# PKGBUILD submitter and maintainer is phible. Patches
+# are from Debian. Thank you!
+
+# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING
+# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
+# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT.
+
+PRGNAM=gbgoffice
+VERSION=${VERSION:-1.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+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 {} \;
+
+# Apply the Debian patches. Thank you Debian!
+patch -p1 -i $CWD/06_const-chars.patch
+patch -p1 -i $CWD/07_gcc4.3.patch
+patch -p1 -i $CWD/08_fix_const_conversion.patch
+patch -p1 -i $CWD/09_deprecated_SigC.patch
+patch -p1 -i $CWD/10_workhelper-buttonbox.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ ChangeLog COPYING COPYING.BULGARIAN README TODO THANKS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/usr/share/applications
+cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications
+
+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}