net-mail/b4: import 0.3.4
[gentoo.git] / net-mail / automx2 / automx2-2019.0.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 PYTHON_COMPAT=( python3_7 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Email client autoconfiguration service"
11 HOMEPAGE="https://automx.org/"
12 SRC_URI="https://gitlab.com/automx/automx2/-/archive/${PV}/${P}.tar.bz2"
13
14 LICENSE="GPL-3+"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE="doc"
18
19 BDEPEND="acct-user/automx2
20         >=dev-python/flask-migrate-2.5.2[${PYTHON_USEDEP}]"
21 RDEPEND="${BDEPEND}"
22
23 python_prepare_all() {
24         sed -i -e "/('scripts'/d" setup.py || die
25         distutils-r1_python_prepare_all
26 }
27
28 python_test() {
29         export AUTOMX2_CONF="tests/unittest.conf"
30         ${EPYTHON} -m unittest discover tests/ || die
31 }
32
33 python_install_all() {
34         if use doc; then
35                 DOCS="*.adoc doc/*.adoc contrib/*sample.conf"
36                 HTML_DOCS="doc/*.html doc/*.svg"
37         fi
38         sed -e "s/@EPYTHON@/${EPYTHON}/" "${FILESDIR}/init" | newinitd - "${PN}"
39         newconfd "${FILESDIR}/confd" "${PN}"
40         insinto /etc
41         newins "${FILESDIR}/conf" "${PN}.conf"
42         distutils-r1_python_install_all
43 }