Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/automx2/files/, net-mail/automx2/
Date: Wed, 20 Oct 2021 02:42:40
Message-Id: 1634697516.7518bba53f569594afdd3d93a4cdfffc00b60d0b.sam@gentoo
1 commit: 7518bba53f569594afdd3d93a4cdfffc00b60d0b
2 Author: Ralph Seichter <github <AT> seichter <DOT> de>
3 AuthorDate: Sat Oct 9 13:55:08 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 20 02:38:36 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7518bba5
7
8 net-mail/automx2: Bump to version 2021.5
9
10 Bundle upstream feature release 2021.5. Ebuild changes:
11
12 - Convert DOCS and HTML_DOCS to array form.
13
14 - Install docs unconditionally. They come pre-generated
15 in the upstream archive and are but small files.
16
17 - Replace "@EPYTHON@" with "python" in init script and
18 drop the now obsolete sed statement.
19
20 Package-Manager: Portage-3.0.20, Repoman-3.0.3
21 Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de>
22 Closes: https://github.com/gentoo/gentoo/pull/22528
23 Signed-off-by: Sam James <sam <AT> gentoo.org>
24
25 net-mail/automx2/Manifest | 1 +
26 net-mail/automx2/automx2-2021.5.ebuild | 46 ++++++++++++++++++++++++++++++++++
27 net-mail/automx2/files/init-r1 | 26 +++++++++++++++++++
28 3 files changed, 73 insertions(+)
29
30 diff --git a/net-mail/automx2/Manifest b/net-mail/automx2/Manifest
31 index 70bd712a071..72263a76bd5 100644
32 --- a/net-mail/automx2/Manifest
33 +++ b/net-mail/automx2/Manifest
34 @@ -1 +1,2 @@
35 DIST automx2-2021.4.tar.gz 170903 BLAKE2B 9c8e9bc95eeac9a8a59430248d532d540e70a40c4d61f006d5d2649198e856e4b404ed75df745cfb06887c58049a9a233a597059e2f2971bf9f1c8ce65a34f3d SHA512 f306bfdca10dc884bef404e5ff24181dc9adfb8514fd0e0d984bac84ca4996f0978eda7161be46f1b3d93a9c0e61aaabdfb4b2886012570a51ad0aaf2286dd2c
36 +DIST automx2-2021.5.tar.gz 172317 BLAKE2B 501dea5561d780fed538676e41dac46da01bae24388f477afa66e1b27e8a271e48bd6bddc8f9a4e0f5e7b3eb9f58fca9a9b2adaf78de2f7cd2feacfc8f85c9a4 SHA512 00281f32df6b117690d9780b8a587907518e2485dc37450765c3f35acb92a27da73ecd4e35cd05e0a5307d179ba3edaa1dec80900a059c975589ae904456c565
37
38 diff --git a/net-mail/automx2/automx2-2021.5.ebuild b/net-mail/automx2/automx2-2021.5.ebuild
39 new file mode 100644
40 index 00000000000..053aba45a4d
41 --- /dev/null
42 +++ b/net-mail/automx2/automx2-2021.5.ebuild
43 @@ -0,0 +1,46 @@
44 +# Copyright 1999-2021 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=7
48 +
49 +PYTHON_COMPAT=( python3_{7,8,9} )
50 +
51 +inherit distutils-r1
52 +
53 +DESCRIPTION="Email client autoconfiguration service"
54 +HOMEPAGE="https://automx.org/"
55 +SRC_URI="https://github.com/rseichter/automx2/archive/${PV}.tar.gz -> ${P}.tar.gz"
56 +
57 +LICENSE="GPL-3+"
58 +SLOT="0"
59 +KEYWORDS="~amd64"
60 +
61 +BDEPEND="acct-user/automx2"
62 +RDEPEND="
63 + dev-python/flask[${PYTHON_USEDEP}]
64 + dev-python/flask-migrate[${PYTHON_USEDEP}]
65 + dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
66 + dev-python/ldap3[${PYTHON_USEDEP}]
67 +"
68 +
69 +distutils_enable_tests unittest
70 +
71 +python_prepare_all() {
72 + sed -i -e "/('scripts'/d" setup.py || die
73 + distutils-r1_python_prepare_all
74 +}
75 +
76 +python_test() {
77 + export AUTOMX2_CONF="tests/unittest.conf"
78 + ${EPYTHON} -m unittest discover tests/ || die "Tests failed with ${EPYTHON}"
79 +}
80 +
81 +python_install_all() {
82 + local DOCS=( ${S}/docs/*.adoc ${S}/contrib/*sample.conf )
83 + local HTML_DOCS=( ${S}/docs/*.{html,svg} )
84 + newconfd "${FILESDIR}/confd" "${PN}"
85 + newinitd "${FILESDIR}/init-r1" "${PN}"
86 + insinto /etc
87 + newins "${FILESDIR}/conf" "${PN}.conf"
88 + distutils-r1_python_install_all
89 +}
90
91 diff --git a/net-mail/automx2/files/init-r1 b/net-mail/automx2/files/init-r1
92 new file mode 100644
93 index 00000000000..56878e8ca37
94 --- /dev/null
95 +++ b/net-mail/automx2/files/init-r1
96 @@ -0,0 +1,26 @@
97 +#!/sbin/openrc-run
98 +# Copyright 1999-2021 Gentoo Authors
99 +# Distributed under the terms of the GNU General Public License v2
100 +
101 +: ${AUTOMX2_CONF:="/etc/${RC_SVCNAME}.conf"}
102 +: ${AUTOMX2_USER:="automx2"}
103 +: ${AUTOMX2_ARGS:="--port 4243"}
104 +
105 +command="/usr/bin/python"
106 +command_args="/usr/bin/flask run ${AUTOMX2_ARGS}"
107 +command_background="true"
108 +command_user="${AUTOMX2_USER}"
109 +pidfile="/run/${RC_SVCNAME}.pid"
110 +required_files="${AUTOMX2_CONF}"
111 +
112 +depend() {
113 + use logger net
114 + before nginx
115 +}
116 +
117 +start_pre() {
118 + export AUTOMX2_CONF
119 + export EPYTHON="python"
120 + export FLASK_APP="automx2.server:app"
121 + export FLASK_ENV="production"
122 +}