Browse Source

n/msmtp: Cleaned up for Slackware64-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
a7ff7d6280
  1. 20
      n/msmtp/msmtp.SlackBuild

20
n/msmtp/msmtp.SlackBuild

@ -31,15 +31,15 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-http://ovh.dl.sourceforge.net/sourceforge/msmtp/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-msmtp}
BUILD=${BUILD:-2GGD}
NAMEPKG=${NAMEPKG:-msmtp}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -55,10 +55,15 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
@ -81,13 +86,14 @@ CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--mandir=/usr/man \
--infodir=/usr/info
--infodir=/usr/info \
--libdir=/usr/lib$LIBDIRSUFFIX
make -j 3
make install DESTDIR=$PKG
# Strip binary
strip --strip-unneeded $PKG/usr/bin/msmtp
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Compress man and info pages
@ -111,7 +117,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save