summaryrefslogtreecommitdiff
path: root/libraries/libofx/libofx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libofx/libofx.SlackBuild')
-rw-r--r--libraries/libofx/libofx.SlackBuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/libraries/libofx/libofx.SlackBuild b/libraries/libofx/libofx.SlackBuild
new file mode 100644
index 0000000000..283d920f6e
--- /dev/null
+++ b/libraries/libofx/libofx.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Slackware build script for libofx
+# Written by Erik Hanson erik@slackbuilds.org
+
+PRGNAM=libofx
+VERSION=0.9.1
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-2}
+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 -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+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 .
+
+# Patch to fix compilation on gcc-4.3.x
+patch -p1 < $CWD/libofx-0.9.0-gcc43.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --with-opensp-libs=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc
+mv $PKG/usr/share/doc/libofx $PKG/usr/doc/$PRGNAM-$VERSION
+rmdir $PKG/usr/share/doc
+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.tgz