#!/bin/sh # Build Mutt for Slackware (by volkerdi@slackware.com) TMP=${TMP:-/tmp} CWD=`pwd` VERSION=1.4.2.2i ARCH=${ARCH:-i386} BUILD=${BUILD:-1_slack8.1} if [ "$ARCH" = "i386" ]; then AOPTS="-march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then AOPTS="-march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then AOPTS="" elif [ "$ARCH" = "x86_64" ]; then AOPTS="" fi PKG=$TMP/package-mutt rm -rf $PKG mkdir $PKG cd $TMP rm -rf $(basename mutt-$VERSION i) tar xjvf $CWD/mutt-$VERSION.tar.bz2 cd $(basename mutt-$VERSION i) chown -R root:root . CFLAGS="-O2 $AOPTS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc/mutt \ --with-mailpath=/var/spool/mail \ --enable-pop \ --enable-imap \ --with-ssl \ --enable-locales-fix \ --without-wc-funcs \ $ARCH-slackware-linux make -j4 || exit 1 make install DESTDIR=$PKG ( 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 ) gzip -9 $PKG/usr/man/man?/* chown -R root.bin $PKG/usr/bin mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh # Don't mv the mutt docs directory, because mutt uses 'em. # Make a link instead. ( cd $PKG/usr/doc ; rm -rf mutt-$VERSION ; ln -sf mutt mutt-$VERSION ) # This stuff is redundant or not useful to most people, IMHO. # If you want it, use the source, Luke. rm -rf \ $PKG/usr/doc/mutt/html \ $PKG/usr/doc/mutt/ChangeLog mv $PKG/etc/mutt/Muttrc $PKG/etc/mutt/Muttrc.new cd $PKG makepkg -l y -c n ../mutt-$VERSION-$ARCH-$BUILD.tgz