commit:     b699f8c3242bede0793a1bccd0e5115080a30819
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Wed Mar 25 13:48:16 2020 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Wed Mar 25 13:48:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b699f8c3

games-action/technic-launcher: use java-pkg-2 eclass

Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 games-action/technic-launcher/files/technic-launcher        |  4 ----
 games-action/technic-launcher/technic-launcher-4.510.ebuild | 13 ++++---------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/games-action/technic-launcher/files/technic-launcher 
b/games-action/technic-launcher/files/technic-launcher
deleted file mode 100644
index 5d98fac..0000000
--- a/games-action/technic-launcher/files/technic-launcher
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-java -jar /opt/technic-launcher/technic-launcher.jar
- 

diff --git a/games-action/technic-launcher/technic-launcher-4.510.ebuild 
b/games-action/technic-launcher/technic-launcher-4.510.ebuild
index 1cf3fc7..9ac25c3 100644
--- a/games-action/technic-launcher/technic-launcher-4.510.ebuild
+++ b/games-action/technic-launcher/technic-launcher-4.510.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop xdg
+inherit desktop java-pkg-2 xdg
 
 DESCRIPTION="Minecraft launcher for community-made modpacks on the Technic 
Platform"
 HOMEPAGE="https://www.technicpack.net/";
@@ -14,7 +14,7 @@ KEYWORDS="~amd64 ~x86"
 LICENSE="technic"
 SLOT="0"
 
-RESTRICT="mirror"
+RESTRICT="bindist mirror"
 
 BDEPEND="media-gfx/imagemagick"
 
@@ -32,13 +32,8 @@ src_compile() {
 }
 
 src_install() {
-       dodir /opt/${PN}
-       insinto /opt/${PN}/
-       newins "${DISTDIR}/${P}.jar" ${PN}.jar
-
-       insinto /opt/bin/
-       doins "${FILESDIR}/${PN}"
-       fperms +x /opt/bin/${PN}
+       java-pkg_newjar "${DISTDIR}/${P}.jar" ${P}.jar
+       java-pkg_dolauncher ${PN} --jar ${P}.jar --java_args "\${JAVA_OPTS}"
 
        newicon -s 16x16 ${PN}-0.png ${PN}.png
        newicon -s 32x32 ${PN}-1.png ${PN}.png

Reply via email to