1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit qmail toolchain-funcs
8 DESCRIPTION="Simple yet powerful mailing list manager for qmail"
9 HOMEPAGE="http://www.ezmlm.org"
10 SRC_URI="http://www.ezmlm.org/archive/${PV}/${P}.tar.gz"
14 KEYWORDS="~alpha amd64 hppa ~mips ppc sparc x86"
17 DEPEND="mysql? ( dev-db/mysql-connector-c:0= )
18 postgres? ( dev-db/postgresql )"
21 REQUIRED_USE="?? ( mysql postgres )"
25 echo /usr/bin > conf-bin || die
26 echo /usr/$(get_libdir)/ezmlm > conf-lib || die
27 echo /etc/ezmlm > conf-etc || die
28 echo /usr/share/man > conf-man || die
29 echo ${QMAIL_HOME} > conf-qmail || die
31 echo $(tc-getCC) ${CFLAGS} -I/usr/include/{my,postgre}sql > conf-cc || die
32 echo $(tc-getCC) ${CFLAGS} -Wl,-E > conf-ld || die
34 # fix DESTDIR and skip cat man-pages
35 sed -e "s:\(/install\) \(\"\`head\):\1 ${D}\2:" \
36 -e "s:\(./install.*\) < MAN$:grep -v \:/cat MAN | \1:" \
37 -e "s:\(\"\`head -n 1 conf-etc\`\"/default\):${D}\1:" \
46 elif use postgres; then
52 dodir /usr/bin /usr/$(get_libdir)/ezmlm /etc/ezmlm /usr/share/man
53 dobin ezmlm-{cgi,checksub,import,rmtab}
55 make DESTDIR="${D}" setup || die "make setup failed"