pentoo-overlay/dev-util/jd-gui-bin/jd-gui-bin-1.5.0-r1.ebuild
2019-05-20 10:30:51 +08:00

41 lines
813 B
Bash

# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN="jd-gui"
MY_P="${MY_PN}-${PV}"
inherit desktop
DESCRIPTION="A standalone Java Decompiler GUI"
HOMEPAGE="http://jd.benow.ca/"
SRC_URI="https://github.com/java-decompiler/jd-gui/releases/download/v${PV}/${MY_P}.jar"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
RDEPEND="virtual/jre"
DEPEND="${RDEPEND}
!dev-util/jd-gui"
S="${WORKDIR}"
src_unpack() {
dodir "${S}"
cp -L "${DISTDIR}/${A}" "${S}/" || die
}
src_install() {
dodir /opt/"${MY_PN}"
insinto /opt/"${MY_PN}"
doins "${MY_P}.jar"
doicon "${FILESDIR}/jd_icon_128.png"
domenu "${FILESDIR}/jd-gui.desktop"
echo -e "#!/bin/sh\njava -jar /opt/${MY_PN}/${MY_P}.jar >/dev/null 2>&1 &\n" > "${MY_PN}"
dobin "${MY_PN}"
}