From c2f0aa03f2e3018427ba5abaa3514632a9ab39bc Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Mon, 16 Sep 2024 17:01:51 +0200 Subject: [PATCH] added dev-java/openweb-start-bin-1.10.1 --- dev-java/openweb-start-bin/Manifest | 1 + .../files/itw-settings.desktop | 7 ++ .../openweb-start-bin/files/javaws.desktop | 8 ++ dev-java/openweb-start-bin/files/jnlp.xml | 5 + .../openweb-start-bin-1.10.1.ebuild | 93 +++++++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 dev-java/openweb-start-bin/Manifest create mode 100644 dev-java/openweb-start-bin/files/itw-settings.desktop create mode 100644 dev-java/openweb-start-bin/files/javaws.desktop create mode 100644 dev-java/openweb-start-bin/files/jnlp.xml create mode 100644 dev-java/openweb-start-bin/openweb-start-bin-1.10.1.ebuild diff --git a/dev-java/openweb-start-bin/Manifest b/dev-java/openweb-start-bin/Manifest new file mode 100644 index 0000000..b829d9d --- /dev/null +++ b/dev-java/openweb-start-bin/Manifest @@ -0,0 +1 @@ +DIST OpenWebStart_linux_1_10_1.deb 56075074 BLAKE2B 36af7190f9c4af14c64edde236646cade918ca74b654bcd4231eb0ccb2e928758aab5df06efb3e3524dbd9246933c30b1a6c1d02d418ea6d6e92013f6843d20f SHA512 bc099a9f499d85442a076e8a80aff148d3561d44ad8f979cc15b9b38897f32bd8d1f832c3cfbb3b26c11742e20f63394d791a941a124e20f4a49ebbe24725897 diff --git a/dev-java/openweb-start-bin/files/itw-settings.desktop b/dev-java/openweb-start-bin/files/itw-settings.desktop new file mode 100644 index 0000000..a2397b2 --- /dev/null +++ b/dev-java/openweb-start-bin/files/itw-settings.desktop @@ -0,0 +1,7 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Type=Application +Name=OpenWebStart Settings +Exec=/bin/sh /opt/OpenWebStart/itw-settings %U +StartupWMClass=install4j-com-openwebstart-launcher-ControlPanelLauncher +Icon=/opt/OpenWebStart/.install4j/itw-settings.png diff --git a/dev-java/openweb-start-bin/files/javaws.desktop b/dev-java/openweb-start-bin/files/javaws.desktop new file mode 100644 index 0000000..fa9991d --- /dev/null +++ b/dev-java/openweb-start-bin/files/javaws.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=OpenWebStart +NoDisplay=true +Exec=/bin/sh /opt/OpenWebStart/javaws %f +Icon=/opt/OpenWebStart/.install4j/javaws.png +MimeType=application/x-java-jnlp-file diff --git a/dev-java/openweb-start-bin/files/jnlp.xml b/dev-java/openweb-start-bin/files/jnlp.xml new file mode 100644 index 0000000..ec723a8 --- /dev/null +++ b/dev-java/openweb-start-bin/files/jnlp.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/dev-java/openweb-start-bin/openweb-start-bin-1.10.1.ebuild b/dev-java/openweb-start-bin/openweb-start-bin-1.10.1.ebuild new file mode 100644 index 0000000..c18b1e1 --- /dev/null +++ b/dev-java/openweb-start-bin/openweb-start-bin-1.10.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PV=${PV//'.'/'_'} + +README_GENTOO_SUFFIX="-r1" + +inherit unpacker desktop readme.gentoo-r1 xdg-utils + +DESCRIPTION="Run Web Start based applications after the release of Java 11" +HOMEPAGE="https://openwebstart.com/" +SRC_URI="https://github.com/karakun/OpenWebStart/releases/download/v${PV}/OpenWebStart_linux_${MY_PV}.deb" + +LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2" +IUSE="" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=virtual/jre-1.8 +" + +RESTRICT="bindist mirror strip test" + +S="${WORKDIR}" + +xxpkg_setup() { + JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}" + JAVA_PKG_WANT_SOURCE="${SLOT}" + JAVA_PKG_WANT_TARGET="${SLOT}" + + # The nastiness below is necessary while the gentoo-vm USE flag is + # masked. First we call java-pkg-2_pkg_setup if it looks like the + # flag was unmasked against one of the possible build VMs. If not, + # we try finding one of them in their expected locations. This would + # have been slightly less messy if openjdk-bin had been installed to + # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env + # file but disable it so that it would not normally be selectable. + + local vm + for vm in ${JAVA_PKG_WANT_BUILD_VM}; do + if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then + java-pkg-2_pkg_setup + return + fi + done + + if has_version --host-root dev-java/openjdk:${SLOT}; then + export JAVA_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} + export JDK_HOME="${JAVA_HOME}" + export ANT_RESPECT_JAVA_HOME=true + else + if [[ ${MERGE_TYPE} != "binary" ]]; then + JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) + [[ -n ${JDK_HOME} ]] || die "Build VM not found!" + JDK_HOME=${JDK_HOME#*/} + JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} + export JDK_HOME + export JAVA_HOME="${JDK_HOME}" + export ANT_RESPECT_JAVA_HOME=true + fi + fi +} + +src_compile() { + echo binary, no cc +} + +src_install() { + default + mv "${S}"/opt "${D}" + mkdir -p "${D}"/usr/share/mime/packages + cp "${FILESDIR}/jnlp.xml" "${D}"/usr/share/mime/packages + newmenu "${FILESDIR}"/itw-settings.desktop openweb-itw-settings.desktop + newmenu "${FILESDIR}"/javaws.desktop openweb-javaws.desktop + newicon "${D}/opt/OpenWebStart/Icon-512.png" openweb-javaws.png +} + +pkg_postinst() { + xdg-icon-resource install --size 512 --context mimetypes "/opt/OpenWebStart/App-Icon-512.png" application-x-java-jnlp-file + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + xdg-icon-resource uninstall --size 512 --context mimetypes application-x-java-jnlp-file + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update +}