network/courier-authlib: Added (Courier authentication library)

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Derek Noonburg 2013-10-27 02:59:47 -05:00 committed by Robby Workman
parent 79ee353aab
commit 22f0b340c3
5 changed files with 133 additions and 0 deletions

View File

@ -0,0 +1,2 @@
The Courier authentication library provides authentication services
for other Courier applications.

View File

@ -0,0 +1,87 @@
#!/bin/sh
# Slackware build script for mod_fastcgi
# Written by Derek Noonburg (derekn@foolabs.com)
# 2013-05-15
# Released into the public domain.
PRGNAM=courier-authlib
VERSION=${VERSION:-0.65.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG="$TMP/package-$PRGNAM"
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"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e # exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R operator .
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
--with-authshadow
make
make install DESTDIR=$PKG
make install-configure DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
gzip -9 $PKG/usr/man/*/*
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
for f in authdaemonrc authldaprc authmysqlrc ; do
mv $PKG/etc/authlib/$f $PKG/etc/authlib/$f.new
done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
README INSTALL COPYING COPYING.GPL AUTHORS NEWS README* \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \;
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.${PKGTYPE:-tgz}

View File

@ -0,0 +1,10 @@
PRGNAM="courier-authlib"
VERSION="0.65.0"
HOMEPAGE="http://www.courier-mta.org/authlib/"
DOWNLOAD="https://download.sourceforge.net/courier/courier-authlib-0.65.0.tar.bz2"
MD5SUM="e9287e33b0e70ea3745517b4d719948d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Derek Noonburg"
EMAIL="derekn@foolabs.com"

View File

@ -0,0 +1,15 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/authlib/authdaemonrc.new
config etc/authlib/authldaprc.new
config etc/authlib/authmysqlrc.new

View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
courier-authlib: courier-authlib (Courier authentication library)
courier-authlib:
courier-authlib: The Courier authentication library provides authentication
courier-authlib: services for other Courier applications.
courier-authlib:
courier-authlib: Homepage: http://www.courier-mta.org/authlib/
courier-authlib:
courier-authlib:
courier-authlib:
courier-authlib:
courier-authlib: