# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Postal 2: Frudge Pack" HOMEPAGE="http://www.gopostal.com/" LICENSE="fudge_pack" SLOT="0" KEYWORDS="~amd64 x86" IUSE="postal1 postal2 aw awp ed babes" RESTRICT="strip" DEPEND="games-util/loki_patch" RDEPEND="x11-libs/libXext amd64? ( app-emulation/emul-linux-x86-baselibs app-emulation/emul-linux-x86-xlibs app-emulation/emul-linux-x86-soundlibs app-emulation/emul-linux-x86-sdl app-emulation/emul-linux-x86-compat )" S=${WORKDIR}/${PN} GAMES_CHECK_LICENSE="yes" src_unpack() { mkdir ${WORKDIR}/${PN} cd ${WORKDIR}/${PN} cdrom_get_cds linux_installer.sh $CDROM_ROOT/linux_installer.sh --tar xf -C ${S} epatch ${FILESDIR}/bin.patch if use postal1; then mkdir ${S}/postal1-lnx-data tar -xf ${S}/postal1-lnx-data.tar -C ${S}/postal1-lnx-data fi if use postal2 || use aw || use awp || use ed; then mkdir ${S}/postal2-lnx-data tar -xf ${S}/postal2-lnx-data.tar -C ${S}/postal2-lnx-data fi if use aw; then mkdir ${S}/postal2aw-lnx-data tar -xf ${S}/postal2aw-lnx-data.tar -C ${S}/postal2aw-lnx-data fi if use awp; then mkdir ${S}/postal2awp-lnx-data tar -xf ${S}/postal2awp-lnx-data.tar -C ${S}/postal2awp-lnx-data fi if use ed; then mkdir ${S}/postal2et-lnx-data tar -xf ${S}/postal2et-lnx-data.tar -C ${S}/postal2et-lnx-data fi } src_install() { if use postal1; then insinto ${GAMES_PREFIX_OPT}/${PN}/postal1game doins -r $CDROM_ROOT/PostalClassic\&Uncut/res/ doins ${S}/postal_plus.ini doins ${S}/postal1-lnx-data/* dogamesbin ${S}/bin/postal1 cp ${S}/postal_plus_realms.ini ${D}/${GAMES_PREFIX_OPT}/${PN}/postal1game/res/levels/ chmod +x ${D}/${GAMES_PREFIX_OPT}/${PN}/postal1game/postal1-bin doicon ${S}/postal1.xpm make_desktop_entry postal1 "Postal Postal" postal1.xpm cd ${D}/${GAMES_PREFIX_OPT}/${PN}/postal1game/ games_make_wrapper postal1 ./postal1-bin "${GAMES_PREFIX_OPT}/${PN}"/postal1game . fi if use postal2 || use aw || use awp || use ed; then cd ${CDROM_ROOT}/System insinto ${GAMES_PREFIX_OPT}/${PN}/postal2game/System doins *.bmp *.int *.u *.ini insinto ${GAMES_PREFIX_OPT}/${PN}/postal2game doins -r \ ${S}/postal2-lnx-data/System # Web Help if use postal2; then doins -r \ $CDROM_ROOT/Animations \ $CDROM_ROOT/KarmaData \ $CDROM_ROOT/Maps \ $CDROM_ROOT/Music \ $CDROM_ROOT/Sounds \ $CDROM_ROOT/System \ $CDROM_ROOT/StaticMeshes \ $CDROM_ROOT/Textures cd ${D}opt/postal_fudge_pack/postal2game/System/ epatch ${FILESDIR}/ini.patch dogamesbin ${S}/bin/postal2 fi if use aw; then doins -r \ $CDROM_ROOT/ApocalypseWeekend \ ${S}/postal2aw-lnx-data/ApocalypseWeekend dogamesbin ${S}/bin/postal2aw fi if use awp; then doins -r \ $CDROM_ROOT/AWP \ ${S}/postal2awp-lnx-data/AWP dogamesbin ${S}/bin/postal2awp fi if use ed; then cp -r $CDROM_ROOT/Eternal\ Damnation ${D}/${GAMES_PREFIX_OPT}/${PN}/postal2game/EternalDamnation doins -r \ ${S}/postal2et-lnx-data/EternalDamnation dogamesbin ${S}/bin/eternaldamnation fi chmod u+x,g+x ${D}/${GAMES_PREFIX_OPT}/${PN}/postal2game/System/postal2-bin chmod u+x,g+x ${D}/${GAMES_PREFIX_OPT}/${PN}/postal2game/System/ucc-bin doicon ${S}/postal2.xpm fi prepgamesdirs if use babes; then dodir /usr/share/pixmaps insinto /usr/share/pixmaps doins -r $CDROM_ROOT/PostalMedia/Pictures/PostalBabes fi }