# Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit go-module systemd DESCRIPTION="Modern, secure, all-in-on email server (binary package)" HOMEPAGE="https://www.xmox.nl/" SRC_URI=" https://github.com/mjl-/mox/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz " LICENSE="|| ( MIT MPL-2.0 )" # bundled project licenses ( run `mox licenses` ) LICENSE+=" MIT BSD Apache-2.0 BSD-2" SLOT="0" KEYWORDS="~amd64" RDEPEND=" acct-user/mox acct-group/mox " BDEPEND=" >=dev-lang/go-1.25.0 " DOCS=( README.md ) PATCHES=( "${FILESDIR}"/${P}-use-gentoo-paths-in-service.patch ) src_compile() { ego build } src_test() { CGO_ENABLED=1 ego test -fullpath -shuffle=on -count 2 -covermode atomic -coverprofile cover.out ./... } src_install() { dobin ${PN} doinitd "${FILESDIR}"/${PN} systemd_dounit ${PN}.service newconfd "${FILESDIR}"/${PN}.confd ${PN} einstalldocs } pkg_postinst() { einfo "Run the mox quickstart to get started" einfo "# cd /var/lib/mox && mox quickstart you@yourdomain.com" }