# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Postal 2: Share The Pain" HOMEPAGE="http://www.gopostal.com/" SRC_URI="http://updatefiles.linuxgamepublishing.com/${PN}/${P}.run" LICENSE="postal2" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="nostrip nomirror" DEPEND="games-util/loki_patch" RDEPEND="amd64? ( app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-xlibs >=media-video/nvidia-glx-1.0.6629-r3 ) || ( x11-libs/libXext virtual/x11 )" dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { games_pkg_setup check_license ${PN} cdrom_get_cds .installation_data/${PN}.tar.bz2 } src_unpack() { unpack_makeself } src_install() { dodir "${dir}" # Extract game data from tarballs on CD for f in {${PN},linux-specific} ; do tar -jxf "${CDROM_ROOT}"/.installation_data/${f}.tar.bz2 -C "${Ddir}"/ \ || die "tar ${f} failed" done games_make_wrapper ${PN} ./${PN}-bin "${dir}/System" doicon "${CDROM_ROOT}"/.installation_data/${PN}.xpm make_desktop_entry ${PN} "Postal 2: Share the Pain" ${PN}.xpm # Apply 1409.1 patch cd "${WORKDIR}" loki_patch patch.dat "${Ddir}" || die "Applying 1409.1 patch" prepgamesdirs } pkg_postinst() { games_pkg_postinst echo einfo "Postal 2: Share the Pain" einfo "has been successfully installed." echo einfo "To play, type: ${PN}" echo }