diff options
author | Niels Horn <niels.horn@gmail.com> | 2010-06-12 14:50:56 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-12 22:14:27 -0500 |
commit | 96418c030230b61d6c7dcd6c40feff336827a705 (patch) | |
tree | d1b10cb71b2bfc62f96e4f636436b069b0e196bb /libraries/libvmime/libvmime.SlackBuild | |
parent | 0b9284970cf7a776292e5f57f4fc03b181b4ffb7 (diff) | |
download | slackbuilds-96418c030230b61d6c7dcd6c40feff336827a705.tar.gz |
libraries/libvmime: Added (mail library in C++)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/libvmime/libvmime.SlackBuild')
-rw-r--r-- | libraries/libvmime/libvmime.SlackBuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/libraries/libvmime/libvmime.SlackBuild b/libraries/libvmime/libvmime.SlackBuild new file mode 100644 index 0000000000..640b410434 --- /dev/null +++ b/libraries/libvmime/libvmime.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for libvmime: +# a library for working with MIME messages + +# Written by Niels Horn <niels.horn@gmail.com> +# revision date 2010/05/28 + +PRGNAM=libvmime +VERSION=${VERSION:-0.9.0} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +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 +# 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 + +# Patch to avoid "::rename has not been declared" error w/ new gcc +patch -p1 < $CWD/gcc44.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 + +find $PKG | xargs file | grep -e "executable" -e "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} |