blob: af6ab8ead8306ac10f882e71ae36a887a26a8633 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop
DESCRIPTION="An application for viewing, editing and converting GPS data"
HOMEPAGE="http://activityworkshop.net/software/gpsprune/index.html"
SRC_URI="http://activityworkshop.net/software/gpsprune/gpsprune_${PV}.jar"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="virtual/jre:*"
RDEPEND="${DEPEND}"
gpsprune_bin="${WORKDIR}/gpsprune"
gpsprune_desktop="${WORKDIR}/gpsprune.desktop"
S="${WORKDIR}"
src_prepare() {
default
# Provide the necessary files
cp "${DISTDIR}/${A}" "${WORKDIR}" || die
for size in 128 96 72 64 48 36 32 24 22 16; do
mkdir -p "${WORKDIR}/icons/$size"
cp "${WORKDIR}/tim/prune/gui/images/window_icon_${size}.png" "${WORKDIR}/icons/$size/gpsprune.png" || die
done
# Generate an executable
cat <<-EOF > "${gpsprune_bin}" || die
#!/bin/sh
java -jar /opt/gpsprune/gpsprune_${PV}.jar \$@
EOF
# Generate a .desktop file
cat <<-EOF > "${gpsprune_desktop}" || die
[Desktop Entry]
Name=GpsPrune
Type=Application
Comment=Application for viewing, editing and converting coordinate data from GPS systems
Exec=gpsprune
Icon=gpsprune
Categories=Science;Geoscience;
EOF
}
src_install() {
insinto /opt/gpsprune
doins "gpsprune_${PV}.jar"
exeinto /usr/bin
doexe "${gpsprune_bin}"
for size in 128 96 72 64 48 36 32 24 22 16; do
insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
doins "icons/${size}/gpsprune.png"
done
domenu gpsprune.desktop
}
|