# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic IUSE="ssl pam tcpd slp cups kerberos krb4 afs debug cracklib" DESCRIPTION="kernel level implementation of the AppleTalk Protocol Suite" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" HOMEPAGE="http://netatalk.sourceforge.net" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86 ~ppc" RDEPEND="sys-apps/shadow pam? ( sys-libs/pam ) ssl? ( dev-libs/openssl ) tcpd? ( sys-apps/tcp-wrappers ) slp? ( net-libs/openslp ) cups? ( net-print/cups ) afs? ( net-fs/openafs ) kerberos? ( app-crypt/mit-krb5 ) krb4? ( app-crypt/mit-krb5 ) cracklib? ( sys-libs/cracklib )" DEPEND="${RDEPEND} sys-apps/sed" src_compile() { # Done this way because this configure script uses odd # names for these. # -AD Rutledge !(use tcpd) && myconf="${myconf} --disable-tcp-wrappers" use kerberos && myconf="${myconf} --enable-krbV-uam" use krb4 && myconf="${myconf} --enable-krb4-uam" # until someone that understands their config script build # system gets a patch pushed upstream to make # --enable-srvloc passed to configure also add slpd to the # use line on the initscript, we'll need to do it this way # -AD Rutledge if use slp; then myconf="${myconf} --enable-srvloc" mv ${S}/distrib/initscripts/rc.atalk.gentoo.tmpl ${S}/distrib/initscripts/rc.atalk.gentoo.tmpl.orig sed -e 's/^\([[:space:]]*use[[:space:][:alnum:]]*\)$/\1 slpd/' \ ${S}/distrib/initscripts/rc.atalk.gentoo.tmpl.orig > ${S}/distrib/initscripts/rc.atalk.gentoo.tmpl fi # FIXME: Make autoconf put these on whatever line builds # afppasswd. append-ldflags -Wl,-z,now econf \ $(use_with pam) \ $(use_enable afs) \ $(use_enable cups) \ $(use_enable ssl) \ $(use_enable debug) \ $(use_with cracklib) \ --enable-fhs \ --with-shadow \ --with-bdb=/usr \ --enable-gentoo \ ${myconf} || die "netatalk configure failed" emake || die "netatalk emake failed" } src_install() { make DESTDIR=${D} install || die "netatalk make install failed" # install docs dodoc CONTRIBUTORS COPYING COPYRIGHT dodoc NEWS README TODO VERSION # install init script dodir /etc/init.d exeinto /etc/init.d doexe ${S}/distrib/initscripts/atalk }