linamh/sci-electronics/digital/digital-0.30.ebuild

69 lines
1.5 KiB
Bash
Raw Permalink Normal View History

# Copyright 1999-2022 Gentoo Authors
2022-03-20 18:42:52 +01:00
# Distributed under the terms of the GNU General Public License v2
2023-07-20 20:28:34 +02:00
EAPI=8
2022-03-20 18:42:52 +01:00
inherit java-pkg-2 xdg-utils
DESCRIPTION="Digital is an easy-to-use digital logic designer and circuit simulator designed for educational purposes."
HOMEPAGE="https://github.com/hneemann/Digital"
SRC_URI="https://github.com/hneemann/Digital/releases/download/v${PV}/Digital.zip -> ${P}.zip"
LICENSE="GPL-3"
RESTRICT=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=">=virtual/jre-1.6
dev-util/desktop-file-utils
"
S="${WORKDIR}/Digital"
pkg_setup() { :; }
src_compile() { :; }
src_install() {
local dir="/opt/${PN}"
# buggy binary crap also requires the demo dir ??
insinto "${dir}"
doins -r examples lib
java-pkg_jarinto "${dir}"
java-pkg_dojar Digital.jar
into "${dir}"
java-pkg_dolauncher ${PN} \
--main "de.neemann.digital.gui.Main" \
--java_args "-Xss4m -Xmx512m"
# for direct run without creating an env.d file link them
dodir /opt/bin
dosym ${dir}/bin/${PN} /opt/bin/${PN}
dodoc docu/* *.txt *.me
newicon icon.svg ${PN}.svg
sed -e "s,<EXEC_LOCATION>,${dir}/bin/${PN},g" \
-e "s,<ICON_LOCATION>,${PN},g" "${S}/linux/desktop.template" > "${S}/${PN}.desktop"
domenu ${PN}.desktop
# Install mime info (from Ubuntu)
insinto /usr/share/mime/packages/
doins "linux/digital-simulator.xml"
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
2022-03-20 18:42:52 +01:00
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
2022-03-20 18:42:52 +01:00
}