commit: 5a55a757c527684b382a43fb4adc5e09bba2289c Author: Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name> AuthorDate: Tue Dec 6 09:12:57 2016 +0000 Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name> CommitDate: Tue Dec 6 09:12:57 2016 +0000 URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=5a55a757
twoworlds: added games-action/twoworlds/twoworlds-2.0.0.2.ebuild | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/games-action/twoworlds/twoworlds-2.0.0.2.ebuild b/games-action/twoworlds/twoworlds-2.0.0.2.ebuild new file mode 100644 index 0000000..f0f685a --- /dev/null +++ b/games-action/twoworlds/twoworlds-2.0.0.2.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=6 + +inherit eutils unpacker + + +DESCRIPTION="Action RPG with open world" +HOMEPAGE="https://en.wikipedia.org/wiki/Two_Worlds_(video_game)" +SRC_URI=" + gog? ( + gog_two_worlds_epic_edition_${PV}.sh + ) +" + +RESTRICT="fetch strip" +LICENSE="EULA" + +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+gog" + +DEPEND=" + app-arch/unzip +" +RDEPEND=" + app-emulation/wine + app-emulation/winetricks +" + +S="${WORKDIR}" + +pkg_nofetch() { + einfo "" + einfo "Please open ${HOMEPAGE}, choose a place to buy it," + einfo "then download \"${SRC_URI}\", and move/link it to \"${DISTDIR}\"" + einfo "" + einfo "P.S.: I've only gog version. So, if you have Humble Store version" + einfo "and want this ebuild to also cover it — please contact me." +} + +src_unpack() { + for f in ${A[@]}; do + unzip -qn "${DISTDIR}/${f}" + done +} + +src_install() { +exit + local dir="/opt/${PN}" arch="x86" exe modexe; + +# use amd64 && arch="x86_64"; + exe="${PN^}.x86"; # fixme when gog'll release x86_64 version + cfgexe="GamepadConfigTool.x86" #.${arch}"; + + insinto "${dir}"; + exeinto "${dir}"; + + cd data/noarch; + + doins -r game/* + doexe "game/${exe}" "game/${cfgexe}" "support/gog-system-report.sh" + + touch "${D}/${dir}/controller.config" + fperms 666 "${dir}/controller.config" # so, gamepad config tool will be able to save content to it, even if runs under unpriv. user + + make_wrapper "${PN}" "./${exe}" "${dir}" + make_wrapper "${PN}-gog-system-report" "./gog-system-report.sh" "${dir}" + make_wrapper "${PN}-gc" "./${cfgexe}" "${dir}" + newicon "support/icon.png" "${PN}.png" + make_desktop_entry "${PN}" "${PN^}: Play" "${PN}" + make_desktop_entry "${PN}-gc" "${PN^}: Gamepad Configuration tool" "${PN}" +} + +pkg_postinst() { + einfo 'If game badly detects your gamepad (i.e. some keys is not working),' + einfo 'you can run `dex-gc` tool (Gamepad Configuration tool)' + einfo 'It will calibrate your gamepad and save configuration so Dex game' + einfo 'will be able to load it and work normally with your gamepad' +}
