summaryrefslogtreecommitdiff
path: root/office/odt2txt/odt2txt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/odt2txt/odt2txt.SlackBuild')
-rw-r--r--office/odt2txt/odt2txt.SlackBuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/office/odt2txt/odt2txt.SlackBuild b/office/odt2txt/odt2txt.SlackBuild
new file mode 100644
index 0000000000..31b13eab48
--- /dev/null
+++ b/office/odt2txt/odt2txt.SlackBuild
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# Slackware build script for odt2txt
+# Written by sercari <sercari@esdebian.org>
+
+PRGNAM=odt2txt
+VERSION=0.4
+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"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+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 .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make
+
+make install DESTDIR=$PKG/usr/
+
+mv $PKG/usr/share/man $PKG/usr/man
+rm -rf $PKG/usr/share
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ GPL-2 INSTALL \
+ $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 $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}