diff options
Diffstat (limited to 'office/kbgoffice/kbgoffice.SlackBuild')
-rw-r--r-- | office/kbgoffice/kbgoffice.SlackBuild | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/office/kbgoffice/kbgoffice.SlackBuild b/office/kbgoffice/kbgoffice.SlackBuild new file mode 100644 index 000000000000..98afc943c778 --- /dev/null +++ b/office/kbgoffice/kbgoffice.SlackBuild @@ -0,0 +1,68 @@ +#!/bin/sh + +# Build script for kbgoffice +# Written by Martin Ivanov (tramni@abv.bg) + +# Feel free to use, modify, redistribute this script. +# If you make changes please modify the "Written by" +# so that I don't recieve emails about a script I +# did not write. Thanks. + +# Extensively modified by Michiel van Wessem <michiel@slackbuilds.org> 20081020 + +PRGNAM=kbgoffice +VERSION=1.8 +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 || exit 1 +rm -rf $PRGNAM-$VERSION +tar -zxvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --datadir=/usr/share/$PRGNAM \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-x \ + --with-kde \ + --build=$ARCH-slackware-linux \ + || exit 1 + +make || exit 1 +make DESTDIR=$PKG install || exit 1 + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -R ChangeLog COPYING COPYING.BULGARIAN INSTALL README THANKS TODO \ + $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 + +cd $PKG +/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |