#!/bin/sh # Buildscript för Sylpheed # http://sylpheed.good-day.net/ # Copyrighted under GNU/GPLv.2 Jens Odsvall # This scrip is based on Patrick Volkerdins buildscripts # and the build tutorial, att http://www.linuxpackages.net # It can bee freely used, under the condition of GNU GPL # Whith this notice # #########################################################a set -e CWD=`pwd` TMP=${TMP:-/tmp/sylpheed/build-dir} if [ ! -d $TMP ]; then mkdir -p $TMP fi ######################################################### PKG=$TMP/package-sylpheed rm -rf $PKG mkdir -p $PKG NAME=${NAME:-sylpheed} RELEASE=${RELEASE:-v2.4.1} VERSION=${VERSION:-2.4.1} PKGVER=${PKGVER:-2.4.1} #URL=${URL:-http://sylpheed.sraoss.jp/$NAME/$RELEASE/$NAME-$VERSION.tar.bz2} ARCH=${ARCH:-i486} BUILD=${BUILD:-1jo} TARGET=${TARGET:-i486-slackware-linux} # Set ftp client #if [ "$CLIENT" = "" ]; then # CLIENT="wget -c" #fi #$CLIENT $URL ######################################################### if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi ######################################################### cd $TMP tar jxvf $CWD/sylpheed-$VERSION.tar.bz2 || exit 1 cd sylpheed-$VERSION ( chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 755 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 644 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --datarootdir=/usr/share \ --enable-ssl \ --disable-nls \ --enable-oniguruma \ --build=${ARCH} make || exit 1 make install make install DESTDIR=$PKG ) # Stripping of binaries and libs ( cd $PKG find . | xargs file | grep "ELF 32-bit LSB executable" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null #find . | xargs file | grep ELF | cut -f 1 -d: | xargs strip --strip-unneeded 2> /dev/null ) chown -R root:root $PKG/usr/bin mkdir -p $PKG/install mkdir -p $PKG/usr/doc/sylpheed cp -a \ AUTHORS COPYING COPYING.LIB \ $PKG/usr/doc/sylpheed cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/sylpheed-$PKGVER-$ARCH-$BUILD.tgz