# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # /space/gentoo/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-1.5.27-rr.ebuild,v 1.2 2002/07/01 16:26:21 muckma Exp DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)" HOMEPAGE="http://asg.web.cmu.edu/cyrus/" SASL_LDAP_VER="ldap-mysql_sasl-1.5.27" S=${WORKDIR}/${P} SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz ldap? (http://www.surf.org.uk/downloads/sasl-${PV}-ldap-ssl-filter-mysql-patch4.tgz)" LICENSE="as-is" SLOT="1" DEPEND="virtual/glibc >=sys-libs/db-3.2 >=sys-libs/pam-0.75 >=sys-devel/automake-1.6.1-r2" # need automake for fixed automake-1.5 support. src_unpack() { unpack ${A} ; cd ${S} use ldap && ( \ patch -p1 < ${WORKDIR}/${SASL_LDAP_VER}/sasl-ldap+mysql.patch || die ) # some nice patches... thanks mandrake ;-) patch -p1 < ${FILESDIR}/${PN}-1.5.21-des.patch || die patch -p1 < ${FILESDIR}/${PN}-configdir.patch || die patch -p1 < ${FILESDIR}/${PN}-saslauthd.patch || die patch -p1 < ${FILESDIR}/${PN}-1.5.24-rpath.patch || die patch -p0 < ${FILESDIR}/${PN}-1.5.27-scram.patch || die rm -f ${S}/config/missing libtoolize --copy --force export WANT_AUTOMAKE_1_5=1 aclocal -I cmulocal || die automake --add-missing || die autoconf || die } src_compile() { local myconf if [ "`use ldap`" ] then myconf="${myconf} --with-ldap=/usr/lib" fi # -lresolv is required by libldap, but configure doesn't pick it up # Not being a Automake/conf guru, this was the easiest soltion for me. LIBS="-lresolv" LIBS="-lresolv" ./configure \ --prefix=/usr \ --libdir=/usr/lib \ --mandir=/usr/share/man \ --with-configdir=/etc/sasl \ --with-pwcheck=/var/lib/sasl \ --with-plugindir=/usr/lib/sasl \ --with-saslauthd=/var/lib/sasl \ --with-dbpath=/var/lib/sasl/sasl.db \ --with-des \ --with-rc4 \ --enable-pam \ --enable-anon \ --enable-cram \ --with-gnu-ld \ --enable-scram \ --enable-plain \ --enable-login \ --disable-krb4 \ --enable-static \ --enable-shared \ --without-mysql \ --enable-digest \ --disable-gssapi \ --disable-sample \ --with-dblib=berkeley \ --host=${CHOST} ${myconf} || die "bad ./configure" make || die "compile problem" } src_install () { make DESTDIR=${D} install || die dodoc COPYING AUTHORS INSTALL NEWS README* TODO \ ChangeLog testing.txt doc/*.txt docinto examples ; dodoc sample/{*.[ch],Makefile} newdoc pwcheck/README README.pwcheck dohtml doc/* insinto /etc/conf.d ; newins ${FILESDIR}/saslauthd.confd saslauthd exeinto /etc/init.d ; newexe ${FILESDIR}/saslauthd.rc6 saslauthd exeinto /etc/init.d ; newexe ${FILESDIR}/pwcheck.rc6 pwcheck } pkg_postinst() { # empty directories.. install -d -m0755 ${ROOT}/var/lib/sasl install -d -m0755 ${ROOT}/etc/sasl }