File diff b76950b7cff3 → 8f48f12283bb
games-rpg/pcgen/pcgen-6.09.05.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2022 Gentoo Authors
 
# Distributed under the terms of the GNU General Public License v2
 

	
 
EAPI=8
 

	
 
inherit desktop
 

	
 
# PCGen naming conventions are different than Gentoo's
 
MY_PV=${PV/_rc/RC}
 
MY_P="${PN}-${MY_PV}"
 

	
 
DESCRIPTION="D&D character generator"
 
HOMEPAGE="http://pcgen.org/"
 
SRC_URI="https://github.com/PCGen/pcgen/releases/download/${MY_PV}/image-linux-x64.zip -> ${P}-linux-x64.zip"
 
S="${WORKDIR}/${PN}-linux-x64"
 

	
 
LICENSE="LGPL-2.1 OGL-1.0a"
 
SLOT="0"
 
KEYWORDS="~amd64"
 

	
 
RDEPEND=">=virtual/jre-11:*"
 
BDEPEND="app-arch/unzip"
 

	
 
QA_PREBUILT="opt/${PN}/*"
 

	
 
src_prepare() {
 
	default
 

	
 
	echo "#!/bin/bash" >> "${T}"/${PN}
 
	echo "cd /opt/${PN}" >> "${T}"/${PN}
 
	echo "./${PN}" >> "${T}"/${PN}
 

	
 
	# fix Anti-Aliasing
 
	sed -i "s/DEFAULT_JVM_OPTS='/DEFAULT_JVM_OPTS='-Dawt.useSystemAAFontSettings=on /g" ${PN} || die
 

	
 
	rm -r LICENSE ${PN}.{bat,exe} || die
 
}
 

	
 
src_install() {
 
	dobin "${T}"/${PN}
 

	
 
	insinto /opt/${PN}
 
	doins -r .
 

	
 
	exeinto /opt/${PN}
 
	doexe ${PN}
 

	
 
	exeinto /opt/${PN}/bin
 
	doexe bin/*
 

	
 
	newicon system/icons/pcgen_128x128.png ${PN}.png
 
	make_desktop_entry ${PN} PCGen
 
}