inherit eutils games DESCRIPTION="World of Padman: Stand Alone Complex" HOMEPAGE="http://worldofpadman.com/" SRC_URI="http://thilo.kickchat.com/download/worldofpadman.run http://camelot.snt.utwente.nl/padman/worldofpadman.run http://download.cfs.game-host.org/get.php?get=/pub/games/wop/worldofpadman.run http://btc3x6.che.uni-bayreuth.de/~tl/wop_final/worldofpadman.run" LICENSE="WOP-EULA" SLOT="0" KEYWORDS="-* ~x86 ~amd64 ~ppc" # Please add dedicated USE and necessary lines of code IUSE="doc source opengl" UIDEPEND="virtual/opengl x86? ( x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp ) amd64? ( app-emulation/emul-linux-x86-xlibs || ( >=app-emulation/emul-linux-x86-xlibs-7.0 x11-drivers/nvidia-drivers x11-drivers/nvidia-legacy-drivers >=x11-drivers/ati-drivers-8.8.25-r1 ) )" DEPEND="" RDEPEND="sys-libs/glibc media-libs/libvorbis amd64? ( app-emulation/emul-linux-x86-baselibs ) opengl? ( ${UIDEPEND} )" # check license needs the license to be installed into licenses directory... #GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/WoP src_unpack() { if use source ; then ewarn "'source' and 'dedicated' USE flags are not working yet" ewarn " Pls help me finish this ebuild!!!" fi unpack_makeself ${A} echo ${S} mkdir ${T}/engine cd ${T}/engine use x86 && tar -xf ${WORKDIR}/wop-engine.i386.tar use amd64 && tar -xf ${WORKDIR}/wop-engine.x86_64.tar use ppc && tar -xf ${WORKDIR}/wop-engine.ppc.tar mkdir ${T}/data cd ${T}/data tar -xf ${WORKDIR}/wop-data.tar if use doc ; then mkdir ${T}/readme cd ${T}/readme tar -xf ${WORKDIR}/readme.tar fi } src_install() { einfo "Installing WoP" dodir ${dir} insinto ${dir} doins ${WORKDIR}/copyright_en.txt ${WORKDIR}/wop.png einfo "Installing WoP data files" dodir ${dir}/wop insinto ${dir}/wop doins ${T}/data/* einfo "Installing WoP engine" exeinto ${dir} doexe ${T}/engine/* || die "doexe" if use x86 ; then arch="i386" fi if use amd64 ; then arch="x86_64" fi if use ppc ; then arch="ppc" fi games_make_wrapper ${PN} ./wop-engine.${arch} ${dir} ${dir} if use dedicated ; then ewarn "USE 'dedicated' not working yet, I'm sorry" fi newicon ${WORKDIR}/wop.png ${PN}.png make_desktop_entry ${PN} "World of Padman (binary)" ${PN}.png if use doc ; then einfo "Installing WoP Documentation" dohtml -r ${T}/readme/* fi prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "to start WoP, launch 'wop-bin'" # einfo "to start WoP as dedicated server, launch 'wopded'" if use amd64 ; then ewarn "NOTE: IA32 Emulation must be compiled into your kernel for WoP to run." fi }