summaryrefslogtreecommitdiff
path: root/net-mail/automx2/automx2-2021.5.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/automx2/automx2-2021.5.ebuild')
-rw-r--r--net-mail/automx2/automx2-2021.5.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/net-mail/automx2/automx2-2021.5.ebuild b/net-mail/automx2/automx2-2021.5.ebuild
new file mode 100644
index 000000000000..053aba45a4d9
--- /dev/null
+++ b/net-mail/automx2/automx2-2021.5.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit distutils-r1
+
+DESCRIPTION="Email client autoconfiguration service"
+HOMEPAGE="https://automx.org/"
+SRC_URI="https://github.com/rseichter/automx2/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="acct-user/automx2"
+RDEPEND="
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-migrate[${PYTHON_USEDEP}]
+ dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/ldap3[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+ sed -i -e "/('scripts'/d" setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ export AUTOMX2_CONF="tests/unittest.conf"
+ ${EPYTHON} -m unittest discover tests/ || die "Tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( ${S}/docs/*.adoc ${S}/contrib/*sample.conf )
+ local HTML_DOCS=( ${S}/docs/*.{html,svg} )
+ newconfd "${FILESDIR}/confd" "${PN}"
+ newinitd "${FILESDIR}/init-r1" "${PN}"
+ insinto /etc
+ newins "${FILESDIR}/conf" "${PN}.conf"
+ distutils-r1_python_install_all
+}