summaryrefslogtreecommitdiff
path: root/net-im/sendxmpp-scala/sendxmpp-scala-1.2.2.ebuild
blob: 8cc72d43b5dc0f0033ebe29a51a433e6bc86d9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit java-utils-2

DESCRIPTION="Send XMPP (Jabber) messages via command line"
HOMEPAGE="https://github.com/flowdalic/sendxmpp"

if [[ "${PV}" == "9999" ]] || [[ -n "${EGIT_COMMIT_ID}" ]]; then
	EGIT_REPO_URI="https://github.com/Flowdalic/sendxmpp.git"
	inherit git-r3
else
	SRC_URI="https://github.com/Flowdalic/sendxmpp/releases/download/${PV}/sendxmpp-dist-${PV}.jar"
	KEYWORDS="~amd64 ~arm64"
	S="${WORKDIR}"
fi

LICENSE="GPL-3+"

SLOT="0"

RDEPEND="
	>=virtual/jre-17
	!net-im/sendxmpp
"

src_unpack() {
	# The distfile is the jar itself, nothing to unpack.
	:
}

src_install() {
	java-pkg_newjar "${DISTDIR}"/sendxmpp-dist-${PV}.jar sendxmpp.jar
	java-pkg_dolauncher sendxmpp -jar sendxmpp.jar

	insinto /var/lib/${PN}
	newins - version <<-EOF
	${PVR}
	EOF
}