# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games versionator MY_PV=$(delete_version_separator) DESCRIPTION="Dominions 3: The Awakening is an epic turn-based fantasy strategy game. It provide multiuser game by TCP/IP, e-mail or hot-seat." HOMEPAGE="http://www.dominions3.com/" SRC_URI="http://download.shrapnelgames.com/downloads/dompatch${MY_PV}_linux.zip http://vl-titov.ru/gentoo/dominions3.png" LICENSE="as-is" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="doc" PROPERTIES="interactive" DEPEND="app-arch/unzip" RDEPEND="virtual/opengl virtual/glu !amd64? ( media-libs/libsdl ) amd64? ( app-emulation/emul-linux-x86-xlibs app-emulation/emul-linux-x86-sdl )" dir=${GAMES_PREFIX_OPT}/${PN} QA_PRESTRIPPED="opt/dominions3/dom3" src_unpack() { mkdir -p "${S}"/patch cd "${S}"/patch unpack dompatch${MY_PV}_linux.zip } src_install() { cdrom_get_cds dominions3_installer.run einfo "Copying files to harddisk... this may take a while..." exeinto "${dir}" if use x86 then doexe "${CDROM_ROOT}"/bin_lin/x86/dom3* || die "doexe failed" elif use amd64 then doexe "${CDROM_ROOT}"/bin_lin/amd64/dom3* || die "doexe failed" elif use ppc then doexe "${CDROM_ROOT}"/bin_lin/ppc/dom3* || die "doexe failed" fi insinto "${dir}" doins -r "${CDROM_ROOT}"/Dominions3.app/Contents/Resources/* || \ die "doins failed" # applying the official patches just means overwriting some important # files with their more recent versions: einfo "Applying patch for version ${PV}..." if use x86 then newexe "${S}"/patch/dom3_x86 dom3 || die "doexe failed" elif use amd64 then newexe "${S}"/patch/dom3_amd64 dom3 || die "doexe failed" elif use ppc then newexe "${S}"/patch/dom3_ppc dom3 || die "doexe failed" fi if use doc; then dodoc "${CDROM_ROOT}"/doc/* || die "dodoc failed" dodoc "${S}"/patch/doc/* || die "dodoc failed" fi rm -rf "${S}"/patch/doc/ "${S}"/patch/dom3* || die "rm failed" doins -r "${S}"/patch/* || die "doins failed" doicon "${DISTDIR}"/${PN}.png # update times find "${D}" -exec touch '{}' \; games_make_wrapper dominions3 ./dom3 "${dir}" "${dir}" make_desktop_entry dominions3 "Dominions III" dominions3 prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "To play the game run:" elog " dominions3" echo }