EAPI="2" inherit eutils multilib qmail toolchain-funcs IUSE="postgres mysql sqlite3" DESCRIPTION="Simple yet powerful mailing list manager for qmail." SRC_URI="http://untroubled.org/ezmlm/archive/${PV}/${P}.tar.gz" HOMEPAGE="http://untroubled.org/ezmlm/" SLOT="0" LICENSE="GPLv2" KEYWORDS="x86 ~alpha ~hppa amd64 ~ppc ~mips ~sparc" DEPEND="sys-apps/grep sys-apps/groff mysql? ( dev-db/mysql ) postgres? ( dev-db/postgresql-base ) sqlite3? ( dev-db/sqlite:3 )" RDEPEND="virtual/qmail" src_unpack() { unpack ${A} cd "${S}" || die echo /usr/bin > conf-bin echo /usr/$(get_libdir)/ezmlm > conf-lib echo /etc/ezmlm > conf-etc echo /usr/share/man > conf-man echo ${QMAIL_HOME} > conf-qmail echo $(tc-getCC) ${CFLAGS} -I/usr/include/{my,postgre}sql > conf-cc echo $(tc-getCC) ${CFLAGS} -Wl,-E > conf-ld } src_compile() { emake it man installer if use mysql; then emake mysql || die "make mysql failed" fi if use postgres; then emake pgsql || die "make pgsql failed" fi if use sqlite3; then emake sqlite3 || die "make pgsql failed" fi } src_install () { dodir /usr/bin ./installer ${D}/usr/bin