commit: 46615520da4764d3bf0287b821df427d6a088df9 Author: Ralph Seichter <github <AT> seichter <DOT> de> AuthorDate: Sat Jan 4 08:36:04 2025 +0000 Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org> CommitDate: Thu Jan 9 19:30:02 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46615520
net-mail/automx2: Add ebuild for release 2025.1 - Upstream feature release. - Fix command and command_args in init.d/automx2. Signed-off-by: Ralph Seichter <github <AT> seichter.de> Closes: https://github.com/gentoo/gentoo/pull/40020 Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org> net-mail/automx2/Manifest | 1 + net-mail/automx2/automx2-2025.1.ebuild | 46 ++++++++++++++++++++++++++++++++++ net-mail/automx2/files/init-r2 | 26 +++++++++++++++++++ 3 files changed, 73 insertions(+) diff --git a/net-mail/automx2/Manifest b/net-mail/automx2/Manifest index 619ca0143f83..189a582c1aaf 100644 --- a/net-mail/automx2/Manifest +++ b/net-mail/automx2/Manifest @@ -1 +1,2 @@ DIST automx2-2024.2.tar.gz 169710 BLAKE2B 1977e07291d27168424e536273af4069d0cbe4c44e2c37fc10b4d0a2fa53272c404aae6dbb8b0a33dd9926e9fc94aae7cd3c6e5669454dad802e6a6ad85bfaf6 SHA512 de518e7eb5184d5dcd7945ab860250c6338e3343a9c4bba26bcdd68b4cb1d22de9624c329ff63af1420746a17ea220ad6d4bbda627af64f7ddcc5ae73275e5dd +DIST automx2-2025.1.tar.gz 175571 BLAKE2B c3c7bbeb6f438a24a476ca6d14b4529ea51869786b3d53f8ef1202a4955259274674683614e0ddadc456d1f7d3e1b9ca20b18d266e4ff8aa54c683456834f92f SHA512 cbaaee4863e7bb265a4c2b991395b8ef3b6405be28beded53287328fb766d1ddb12fde0fdf4ea8992ed0b8abba0e83a018b60054e778a97c734a9a68c391d776 diff --git a/net-mail/automx2/automx2-2025.1.ebuild b/net-mail/automx2/automx2-2025.1.ebuild new file mode 100644 index 000000000000..0647731a280f --- /dev/null +++ b/net-mail/automx2/automx2-2025.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) + +inherit distutils-r1 + +DESCRIPTION="Mail User Agent (email client) configuration made easy" +HOMEPAGE="https://rseichter.github.io/automx2/" +SRC_URI="https://github.com/rseichter/automx2/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="acct-user/automx2 + 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() { + rm -r src/alembic || die + distutils-r1_python_prepare_all +} + +python_test() { + local -x AUTOMX2_CONF="tests/unittest.conf" + eunittest tests/ +} + +python_install_all() { + local DOCS=( "${S}"/docs/*.pdf ) + local HTML_DOCS=( "${S}"/docs/*.{html,svg} ) + newconfd "${FILESDIR}/confd" "${PN}" + newinitd "${FILESDIR}/init-r2" "${PN}" + insinto /etc + newins "${FILESDIR}/conf" "${PN}.conf" + distutils-r1_python_install_all +} diff --git a/net-mail/automx2/files/init-r2 b/net-mail/automx2/files/init-r2 new file mode 100644 index 000000000000..bf64b5bd74c7 --- /dev/null +++ b/net-mail/automx2/files/init-r2 @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${AUTOMX2_CONF:="/etc/${RC_SVCNAME}.conf"} +: ${AUTOMX2_USER:="automx2"} +: ${AUTOMX2_ARGS:="--port 4243"} + +command="/usr/bin/flask" +command_args="run ${AUTOMX2_ARGS}" +command_background="true" +command_user="${AUTOMX2_USER}" +pidfile="/run/${RC_SVCNAME}.pid" +required_files="${AUTOMX2_CONF}" + +depend() { + use logger net + before nginx +} + +start_pre() { + export AUTOMX2_CONF + export EPYTHON="python" + export FLASK_APP="automx2.server:app" + export FLASK_ENV="production" +}
