# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-mail/ezmlm-idx-mysql/ezmlm-idx-mysql-0.40-r2.ebuild,v 1.11 2006/11/23 16:05:41 vivo Exp $ # NOTE: ezmlm-idx, ezmlm-idx-mysql and ezmlm-idx-pgsql all supported by this single ebuild # (Please keep them in sync) inherit eutils fixheadtails PB=ezmlm-idx EZMLM_P=ezmlm-0.53 S2=${WORKDIR}/${PB}-${PV} S=${WORKDIR}/${EZMLM_P} DESCRIPTION="Simple yet powerful mailing list manager for qmail." SRC_URI="http://www.ezmlm.org/archive/${PV}/${PB}-${PV}.tar.gz http://cr.yp.to/software/${EZMLM_P}.tar.gz" HOMEPAGE="http://www.ezmlm.org" SLOT="0" LICENSE="as-is" KEYWORDS="alpha amd64 hppa mips ppc sparc x86" IUSE="" DEPEND="sys-apps/grep sys-apps/groff" RDEPEND="virtual/qmail" if [ "$PN" = "${PB}-pgsql" ] then DEPEND="$DEPEND dev-db/postgresql" RDEPEND="$RDEPEND dev-db/postgresql" elif [ "$PN" = "${PB}-mysql" ] then DEPEND="$DEPEND virtual/mysql" RDEPEND="$RDEPEND virtual/mysql" fi src_unpack() { unpack ${A} cd ${S2} mv ${S2}/* ${S} || die cd ${S} patch < idx.patch || die echo "/usr/bin" > conf-bin echo "/usr/share/man" > conf-man echo "gcc ${CFLAGS}" > conf-cc echo "gcc" > conf-ld #tweak the install to go to ${D} # Also skips installing the cat-man pages cp Makefile Makefile.orig sed -e "s:/install.*conf-bin\`\":/install ${D}usr/bin:" \ -e "s:/install.*conf-etc\`\":/install ${D}etc/ezmlm:" \ -e "s:\./install.*conf-man.*$:grep -v \:/cat MAN | ./install ${D}usr/share/man:" \ -e "s:\"\`head -n 1 conf-etc\`\"/default:${D}etc/ezmlm/default:" Makefile.orig > Makefile } src_compile() { cd ${S} if [ "$PN" = "${PB}-pgsql" ] then echo pgsql > conf-sub elif [ "$PN" = "${PB}-mysql" ] then echo mysql > conf-sub fi emake || die } src_install () { install -d ${D}/usr/bin ${D}/usr/share/man ${D}/etc/ezmlm make setup || die # Bug #47668 -- need to install ezmlm-cgi dobin ezmlm-cgi cp ezcgirc ${D}/etc/ezmlm }