diff options
Diffstat (limited to 'network/msmtp/msmtp.SlackBuild')
-rw-r--r-- | network/msmtp/msmtp.SlackBuild | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/network/msmtp/msmtp.SlackBuild b/network/msmtp/msmtp.SlackBuild index e5b63bb074..96245e655b 100644 --- a/network/msmtp/msmtp.SlackBuild +++ b/network/msmtp/msmtp.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for msmtp # Copyright 2007 Martin Lefebvre <dadexter@sekurity.com> +# Copyright 2009 Grigorios Bouzakis <grbzks@xsmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +23,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by the SlackBuilds.org project - PRGNAM=msmtp -VERSION=1.4.13 +VERSION=${VERSION:-1.4.19} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -36,48 +36,66 @@ 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 $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R a-s,u+w,go+r-w . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --infodir=/usr/info \ - || exit 1 + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG -make || exit 1 -make install DESTDIR=$PKG || exit 1 +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | 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 +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done ) -gzip -9 $PKG/usr/man/man?/* $PKG/usr/info/*.info -rm $PKG/usr/info/dir +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README* THANKS \ - doc/*.txt doc/msmtp.html doc/msmtp.pdf doc/msmtprc-system.example \ - doc/msmtprc-user.example $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS doc/*.txt \ + doc/msmtp.html doc/msmtprc-system.example doc/msmtprc-user.example \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |