# SliTaz package receipt.

PACKAGE="cyrus-sasl"
VERSION="2.1.23"
CATEGORY="network"
SHORT_DESC="SASL authentication server."
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://cyrusimap.web.cmu.edu/"
WGET_URL="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$TARBALL"

DEPENDS="libldap openssl libdb libsasl libsasl-modules libcomerr3"
BUILD_DEPENDS="openldap-dev db-dev openssl-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./configure \
		--with-ldap=/usr \
		--with-openssl=/usr \
		--without-pam \
		--with-devrandom=/dev/urandom \
		$CONFIGURE_ARGS
	sed -i 's/WITH_DES/WITH_DES 1/' config.h
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib/sasl2 $fs/var/state/saslauthd
	cp -a $_pkg/usr/sbin $fs/usr
	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
	cp -a $_pkg/usr/lib/sasl2/*.so* $fs/usr/lib/sasl2
	cp -a $stuff/etc $fs
	
	cat $stuff/*.files-list | while read file; do
		rm -rf $fs$file
	done
}