net-mail/mailman: Remove old
[gentoo.git] / net-mail / qmailadmin / qmailadmin-1.2.16.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit qmail webapp autotools
7
8 MY_P=${P/_rc/-rc}
9
10 DESCRIPTION="A web interface for managing a qmail system with virtual domains"
11 HOMEPAGE="http://www.inter7.com/qmailadmin.html"
12 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 WEBAPP_MANUAL_SLOT="yes"
17 KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~s390 ~sparc ~x86"
18 IUSE="maildrop"
19 # the RESTRICT is because the vpopmail lib directory is locked down
20 # and non-root can't access them.
21 RESTRICT="userpriv"
22
23 DEPEND="virtual/qmail
24         >=net-mail/vpopmail-5.4.33
25         net-mail/autorespond
26         maildrop? ( >=mail-filter/maildrop-2.0.1 )"
27 DEPEND=${RDEPEND}
28
29 S="${WORKDIR}"/${MY_P}
30
31 src_prepare() {
32         eapply "${FILESDIR}"/${PN}-1.2.9-maildir.patch
33         eapply_user
34         eautoreconf
35 }
36
37 src_configure() {
38         # Pass spam stuff through $@ so we get the quoting right
39         if use maildrop ; then
40                 set -- --enable-modify-spam \
41                         --enable-spam-command='|preline maildrop /etc/maildroprc'
42         else
43                 set --
44         fi
45
46         econf \
47                 --enable-valias \
48                 --enable-vpopmaildir=/var/vpopmail \
49                 --enable-htmldir="${MY_HTDOCSDIR}" \
50                 --enable-imagedir="${MY_HTDOCSDIR}"/images \
51                 --enable-imageurl=/${PN}/images \
52                 --enable-htmllibdir=/usr/share/${PN}/htmllib \
53                 --enable-cgibindir="${MY_CGIBINDIR}" \
54                 --enable-cgipath=/cgi-bin/${PN} \
55                 --enable-qmaildir="${QMAIL_HOME}" \
56                 --enable-autoresponder-path="${QMAIL_HOME}"/bin \
57                 --enable-true-path=/bin \
58                 --enable-ezmlmdir=/usr/bin \
59                 --enable-domain-autofill \
60                 --enable-modify-quota \
61                 --enable-no-cache \
62                 --enable-trivial-password \
63                 --enable-catchall \
64                 --enable-maxusersperpage=50 \
65                 --enable-maxaliasesperpage=50 \
66                 --enable-vpopuser=vpopmail \
67                 --enable-vpopgroup=vpopmail \
68                 "$@"
69 }
70
71 src_install() {
72         webapp_src_preinst
73
74         local DOCS=(
75                 AUTHORS INSTALL README.hooks BUGS TODO ChangeLog TRANSLATORS
76                 NEWS FAQ README contrib/*
77         )
78         default
79
80         webapp_src_install
81
82         # CGI needs to be able to read /etc/vpopmail.conf
83         # Which is 0640 root:vpopmail, as it contains passwords
84         cgi=/usr/share/webapps/${PN}/${PV}/hostroot/cgi-bin/qmailadmin
85         fowners root:vpopmail ${cgi}
86         fperms g+s ${cgi}
87 }
88
89 pkg_postinst() {
90         einfo "If you would like support for ezmlm mailing lists inside qmailadmin,"
91         einfo "please emerge some variant of ezmlm-idx."
92         webapp_pkg_postinst
93         einfo "For complete webapp-config support:"
94         einfo "1. Add this for the Apache cgi-bin dir: Options +ExecCGI -MultiViews +FollowSymLinks"
95         einfo "2. Run: webapp-config -I -h localhost -d qmailadmin $PN $PV"
96         einfo "3. Symlink: ln -s {/usr/share/webapps/${PN}/${PV}/hostroot,/var/www/localhost}/cgi-bin/${PN}"
97 }