n/dovecot: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent 653cca1389
commit 1dc530c012
  1. 5
      n/dovecot/doinst.sh
  2. 24
      n/dovecot/dovecot.SlackBuild

@ -12,9 +12,10 @@ config()
config /etc/dovecot.conf.new
if ! grep ^dovecot /etc/group > /dev/null ; then
/usr/sbin/groupadd dovecot
/usr/sbin/groupadd -g 202 dovecot
fi
if ! grep ^dovecot /etc/passwd > /dev/null ; then
/usr/sbin/useradd -C Dovecot -d /var/run/dovecot -g dovecot dovecot
/usr/sbin/useradd -u 202 -C Dovecot -d /var/run/dovecot -g dovecot \
-s /bin/false dovecot
fi

@ -31,15 +31,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://www.dovecot.org/releases/1.1/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-dovecot}
BUILD=${BUILD:-2GGD}
NAMEPKG=${NAMEPKG:-dovecot}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
JOBS=${JOBS:-1}
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 +56,15 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
@ -66,7 +72,8 @@ esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
@ -80,6 +87,7 @@ CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/doc/$NAME \
@ -92,14 +100,14 @@ CXXFLAGS=$CPUOPT \
--with-bzlib \
--without-pop3d \
--without-deliver
make -j 3
make -j $JOBS
make install DESTDIR=$PKG
mv $PKG/etc/dovecot-{ldap,sql,db}-example.conf $PKG/usr/doc/$NAME
mv $PKG/etc/dovecot-example.conf $PKG/etc/dovecot.conf.new
rm -rf $PKG/usr/include
# Strip binaries
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
# Copy auxiliary files
@ -112,7 +120,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