summaryrefslogtreecommitdiff
path: root/sci-geosciences/josm-bin/josm-bin-18118.ebuild
blob: 3d54799f8cdc6154c07776fd1a5ec2c3f3d08b33 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop java-utils-2 xdg

DESCRIPTION="Java-based editor for the OpenStreetMap project"
HOMEPAGE="https://josm.openstreetmap.de/"
SRC_URI="https://josm.openstreetmap.de/download/josm-snapshot-${PV}.jar"
S="${WORKDIR}"

LICENSE="Apache-2.0 GPL-2+ GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND=">=virtual/jre-1.8"

src_install() {
	java-pkg_newjar "${DISTDIR}/${A}" ${PN}.jar
	java-pkg_dolauncher ${PN} --jar ${PN}.jar

	local icon_size
	for icon_size in 16 32 48; do
		newicon -s ${icon_size} -t hicolor \
			images/logo_${icon_size}x${icon_size}x32.png ${PN}.png
		newicon -s ${icon_size} -t locolor \
			images/logo_${icon_size}x${icon_size}x8.png ${PN}.png
	done
	make_desktop_entry ${PN} "Java OpenStreetMap Editor" ${PN} "Utility;Science;Geoscience"
}