aboutsummaryrefslogtreecommitdiff
path: root/graphics/fig2sxd/fig2sxd.SlackBuild
diff options
context:
space:
mode:
authorDario Nicodemi <dario.sbo@gmail.com>2010-04-08 11:39:56 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-15 10:25:06 +0200
commit05d6bdb09271487b8d628353b3b498a23cabcf4f (patch)
tree305f48d7de53dc37eb67add210ea00c86cf8f41d /graphics/fig2sxd/fig2sxd.SlackBuild
parent8216c2a616ddfc289d8b6e3d8f5d68243a010aca (diff)
graphics/fig2sxd: Added - a fig to OOo Draw converter.
Diffstat (limited to 'graphics/fig2sxd/fig2sxd.SlackBuild')
-rwxr-xr-xgraphics/fig2sxd/fig2sxd.SlackBuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/graphics/fig2sxd/fig2sxd.SlackBuild b/graphics/fig2sxd/fig2sxd.SlackBuild
new file mode 100755
index 000000000000..dacc80daa10a
--- /dev/null
+++ b/graphics/fig2sxd/fig2sxd.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Slackware build script for fig2sxd
+
+# Written by Dario Nicodemi dario.sbo@gmail.com
+
+PRGNAM=fig2sxd
+VERSION=${VERSION:-0.20}
+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 # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}_${VERSION}.orig.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 {} \;
+
+make CXXFLAGS="-Wall -W -g $SLKCFLAGS" DESTDIR=/usr
+make install DESTDIR=$PKG/usr
+mv $PKG/usr/share/man $PKG/usr
+rm -rf "$PKG/usr/share"
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( 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 changelog $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}