From fb65e6a7261411713e17d1b7da74cc5a8a0e8e5b Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 10 Jun 2016 22:39:58 +0200 Subject: [PATCH] games-rpg/icewind-dale-ee: initial import --- .../icewind-dale-ee-1.4.0.exheres-0 | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 packages/games-rpg/icewind-dale-ee/icewind-dale-ee-1.4.0.exheres-0 diff --git a/packages/games-rpg/icewind-dale-ee/icewind-dale-ee-1.4.0.exheres-0 b/packages/games-rpg/icewind-dale-ee/icewind-dale-ee-1.4.0.exheres-0 new file mode 100644 index 0000000..2b2ceaa --- /dev/null +++ b/packages/games-rpg/icewind-dale-ee/icewind-dale-ee-1.4.0.exheres-0 @@ -0,0 +1,88 @@ +# Copyright 2016 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require desktop-utils gtk-icon-cache + +SUMMARY="Icewind Dale: Enhanced Edition" +HOMEPAGE="https://www.gog.com/game/icewind_dale_enhanced_edition" +IWD_SH="gog_icewind_dale_enhanced_edition_2.1.0.4.sh" +DOWNLOADS="manual: ${IWD_SH}" + +LICENCES="all-rights-reserved GOG-EULA" +SLOT="0" +PLATFORMS="-* ~x86" +MYOPTIONS="" +RESTRICT="fetch" + +DEPENDENCIES=" + build: + virtual/unzip +" + +WORK="${WORKBASE}/data/noarch" + +pkg_pretend() { + if [[ $(exhost --target) != i686-* ]];then + die "${CATEGORY}/${PNVR} is i686 only, you'll have to cross compile it :(" + fi +} + +pkg_nofetch() { + einfo + einfo "Please buy & download \"${IWD_SH}\" from:" + einfo " ${HOMEPAGE}" + einfo "and move/link it to \"${FETCHEDDIR}\"" + einfo +} + +pkg_setup() { + exdirectory --allow /opt +} + +src_unpack() { + unzip -qo "${FETCHEDDIR}/${IWD_SH}" + [[ $? -le 1 ]] || die "unpacking ${IWD_SH} failed!" +} + +src_install() { + local dir=/opt/${PN} + local f + + insinto "${dir}" + doins -r game + edo chmod +x "${IMAGE}${dir}"/game/IcewindDale + + dodir "${dir}/lib" + + edo pushd "${WORK}"/lib + exeinto "${dir}/lib" + for f in * ; do + if [[ -L ${f} ]] ; then + dosym "$(readlink ${f})" "${dir}"/lib/${f} + else + doexe ${f} + fi + done + unset f + edo popd + + insinto /usr/share/icons/hicolor/256x256/apps + newins support/icon.png ${PN}.png + + local LD_PATH="/usr/$(exhost --target)/lib/ld-linux.so.2"; + herebin ${PN} <