# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 DESCRIPTION="GpsPrune is an application for viewing, editing and converting coordinate data from GPS systems." HOMEPAGE="http://activityworkshop.net/software/gpsprune/index.html" SRC_URI="http://activityworkshop.net/software/gpsprune/gpsprune_${PV}.jar" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND="virtual/jre" RDEPEND="${DEPEND}" gpsprune_bin="${WORKDIR}/gpsprune" gpsprune_desktop="${WORKDIR}/gpsprune.desktop" S="${WORKDIR}" src_unpack() { default } src_prepare() { # Provide the necessary files cp "${DISTDIR}/${A}" "${WORKDIR}" || die cp "${WORKDIR}/tim/prune/gui/images/window_icon.png" "${WORKDIR}/gpsprune.png" || die # 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 insinto /usr/share/icons/hicolor/16x16/apps doins gpsprune.png insinto /usr/share/applications doins gpsprune.desktop }