summaryrefslogtreecommitdiff
path: root/libraries/libvmime/libvmime.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libvmime/libvmime.SlackBuild')
-rw-r--r--libraries/libvmime/libvmime.SlackBuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/libraries/libvmime/libvmime.SlackBuild b/libraries/libvmime/libvmime.SlackBuild
new file mode 100644
index 0000000000..207a3b4f28
--- /dev/null
+++ b/libraries/libvmime/libvmime.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for libvmime:
+# a library for working with MIME messages
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2009/12/17
+
+PRGNAM=libvmime
+VERSION=0.9.0
+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 $TMP/$PRGNAM-$VERSION $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Patch "configure" to accept gnutls-2.8 (Security patch in Slackware 13.0)
+# (Based on: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529834)
+patch -p1 < $CWD/gnutls-28.patch
+
+# Force "configure" to respect our CFLAGS / CXXFLAGS
+patch -p1 < $CWD/flags.patch
+
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make docdir=/usr/doc/$PRGNAM-$VERSION
+make docdir=/usr/doc/$PRGNAM-$VERSION install DESTDIR=$PKG
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+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}