Files
bongo/net-mail/xeams-devnullsmtp-bin/xeams-devnullsmtp-bin-20231024.ebuild
2026-07-18 22:32:46 +02:00

47 lines
1.2 KiB
Bash

# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit java-pkg-2
DESCRIPTION="Console-capable dummy SMTP server for mail delivery tests"
HOMEPAGE="https://www.xeams.com/DevNull.htm"
SRC_URI="https://www.xeams.com/files/DevNullSmtp.zip -> ${P}.zip"
S="${WORKDIR}"
LICENSE="Xeams-EULA Apache-2.0 BSD CDDL GPL-2-with-classpath-exception"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="bindist strip test"
RDEPEND=">=virtual/jre-8:*"
BDEPEND="app-arch/unzip"
src_compile() {
:
}
src_install() {
java-pkg_newjar DevNullSmtp.jar DevNullSmtp.jar
java-pkg_dolauncher xeams-devnullsmtp \
--jar DevNullSmtp.jar \
--java_args "-Djava.awt.headless=true" \
--pkg_args "-console"
java-pkg_dolauncher xeams-devnullsmtp-no-tls \
--jar DevNullSmtp.jar \
--java_args "-Djava.awt.headless=true -Ddevnull.disable.starttls=true" \
--pkg_args "-console"
dodoc ReadMe.txt "${FILESDIR}/README.gentoo"
}
pkg_postinst() {
elog "Run an isolated console SMTP sink, for example:"
elog " xeams-devnullsmtp -p 2526 -d example.test -s /tmp/devnull-mail"
elog
ewarn "Without -d, DevNullSMTP intentionally accepts every recipient."
ewarn "It has no listen-address option; isolate it with a firewall or container."
}