#!/bin/sh # Build script for: WvStreams # Distribution: Slackware Linux 12.2 # Packager baldelario ~at~ gmail ~dot~ com # http://www.slacky.eu # Source location: http://code.google.com/p/wvstreams/ # # WARN: wvstreamers use "internal" xplc, so, in order to # avoid overwriting between it and the stand alone # (and system wide) xplc package it has been built # with "--libdir" options. # wvstreamer also does not support dbdm, swig, slp, # and other wrappers any longer. # Check ChangeLog Out. # Michelino Chionchio (2008/06/09) CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-wvstreams NAME=wvstreams VERSION=4.5.1 CHOST=i486 ARCH=${ARCH:-i486} BUILD=1bj SOURCE=http://wvstreams.googlecode.com/files/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi rm -rf $PKG if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi echo "| Start SlackBuild $NAME-$VERSION |" cd $TMP rm -rf $NAME-$VERSION tar xzvf $CWD/$NAME-$VERSION.tar.gz cd $NAME-$VERSION chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --libdir=/usr/lib/wvstreams \ --with-openssl \ --with-pam=no \ --with-tcl \ --with-qt \ --with-zlib \ --program-prefix= \ --program-suffix= \ --build=$CHOST-slackware-linux make || exit 1 make install DESTDIR=$PKG || exit 1 rm -f $PKG/var/lib/uniconf/uniconfd.ini cp -a $TMP/$NAME-$VERSION/uniconf/daemon/uniconfd.ini $PKG/var/lib/uniconf/uniconfd.ini # Put pkgconfig in the right place (due to "--libdir" options) mv $PKG/usr/lib/wvstreams/pkgconfig/ $PKG/usr/lib/pkgconfig/ ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -d : -f 1 | xargs -r strip --strip-unneeded find . | xargs file | grep "shared object" | grep ELF | cut -d : -f 1 | xargs -r strip --strip-unneeded find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-debug ) find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a COPYING* ChangeLog README* $PKG/usr/doc/$NAME-$VERSION mv $PKG/etc/uniconf.conf $PKG/etc/uniconf.conf.new mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi