summaryrefslogtreecommitdiff
path: root/net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild')
-rw-r--r--net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild114
1 files changed, 114 insertions, 0 deletions
diff --git a/net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild b/net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild
new file mode 100644
index 000000000000..ec88508291a1
--- /dev/null
+++ b/net-mail/stalwart-mail/stalwart-mail-0.16.5.ebuild
@@ -0,0 +1,114 @@
+# Copyright 2024-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Autogenerated by pycargoebuild 0.15.0
+
+EAPI=8
+
+CRATES="
+"
+
+declare -A GIT_CRATES=(
+ [opentelemetry-http]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry-http'
+ [opentelemetry-otlp]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry-otlp'
+ [opentelemetry-proto]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry-proto'
+ [opentelemetry-semantic-conventions]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry-semantic-conventions'
+ [opentelemetry]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry'
+ [opentelemetry_sdk]='https://github.com/stalwartlabs/opentelemetry-rust;274b4d324794280ce6f4def095a3428197a9e6e3;opentelemetry-rust-%commit%/opentelemetry-sdk'
+)
+
+RUST_MIN_VER="1.88.0"
+inherit cargo systemd
+
+DESCRIPTION="Stalwart Mail Server"
+HOMEPAGE="https://stalw.art"
+SRC_URI="https://github.com/stalwartlabs/stalwart/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ ${CARGO_CRATE_URIS}
+"
+if [[ ${PKGBUMPING} != ${PVR} ]]; then
+ SRC_URI+="
+ https://dev.gentoo.org/~lordvan/stalwart-${PV}-crates.tar.xz
+ "
+fi
+
+S="${WORKDIR}/stalwart-${PV}"
+
+LICENSE="|| ( AGPL-3 )"
+# Dependent crate licenses
+LICENSE+="
+ AGPL-3 Apache-2.0 BSD-2 BSD Boost-1.0 CC0-1.0 CDLA-Permissive-2.0
+ ISC LGPL-2+ MIT MPL-2.0 Unicode-3.0 ZLIB BZIP2
+"
+
+# 0.16.x has breaking changes so avoid installing new server with old cli
+DEPEND+="
+ !!<net-mail/stalwart-cli-1.0.0
+"
+
+RDEPEND="acct-group/stalwart-mail
+ acct-user/stalwart-mail"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="sqlite postgres mysql +rocks"
+
+DOCS="CHANGELOG.md CONTRIBUTING.md README.md SECURITY.md SECURITY_PROCESS.md SECURITY_TEMPLATE.md"
+
+src_unpack() {
+ cargo_src_unpack
+ sed -i -e "s%__PATH__/etc/%/opt/stalwart-mail/etc/%g" "${S}"/resources/systemd/stalwart-mail.service || die
+ sed -i -e "s%__PATH__/bin/%/usr/bin/%g" "${S}"/resources/systemd/stalwart-mail.service || die
+}
+
+# src_prepare() {
+# pushd .
+# cd "${WORKDIR}/cargo_home/gentoo/librocksdb-sys-0.17.1+9.9.3/rocksdb"
+# eapply "${FILESDIR}/rocksdb-10.1-fixincludes.patch"
+# popd
+# eapply_user
+# }
+
+src_configure() {
+ local myfeatures=(
+ $(usev sqlite)
+ $(usev postgres)
+ $(usev mysql)
+ $(usev rocks)
+ )
+ # TODO: consider "enterprise" USE flag, which requires a premium license
+ cargo_src_configure --no-default-features
+}
+
+src_compile() {
+ cargo_src_compile --bin stalwart
+}
+
+src_install() {
+ cargo_src_install --path crates/main
+
+ newinitd "${FILESDIR}"/stalwart-mail.initd stalwart-mail
+ systemd_dounit "${S}"/resources/systemd/stalwart-mail.service
+
+ einstalldocs
+}
+
+pkg_config() {
+ if [[ ! -d ${ROOT}/opt/stalwart-mail ]]; then
+ einfo "Initializing standard config in ${ROOT}/opt/stalwart-mail"
+ "${ROOT}"/usr/bin/stalwart-mail --init "${ROOT}"/opt/stalwart-mail
+ else
+ einfo "It appears you already have a config in stalwart-mail."
+ einfo "Please remove ${ROOT}/opt/stalwart-mail and run this again"
+ einfo "if you want to create a new clean standard config."
+ fi
+}
+
+pkg_postinst() {
+ ewarn "If you are upgrading from v0.15.5 and below, this version includes"
+ ewarn "breaking changes to the internal directory, calendar and contacts."
+ ewarn "Please read the upgrading documentation for more information on "
+ ewarn "how to upgrade from previous versions."
+ ewarn "It can be found here: https://stalw.art/docs/install/upgrade/"
+ ewarn "0.16 upgrade instructions are here:"
+ ewarn "https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING/v0_16.md"
+}