# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-rpg/planeshift/planeshift-0.3.018-r3.ebuild,v 1.3 2007/02/25 09:00:00 loux.thefuture Exp $ inherit eutils games DESCRIPTION="Virtual fantasy world MMORPG" HOMEPAGE="http://www.planeshift.it/" SRC_URI="http://loux.thefuture.free.fr/distfiles/${P}-r3.tar.bz2" LICENSE="|| ( GPL-2 Planeshift )" SLOT="0" KEYWORDS="~amd64 ~ppc x86" IUSE="server static" RDEPEND="net-misc/curl >=media-libs/cal3d-0.11 >=dev-games/crystalspace-ps-1.1-r26479 >=dev-games/cel-ps-1.1-r2637" S=${WORKDIR}/${PN} PLANESHIFT_PREFIX=/opt/planeshift src_compile() { ./autogen.sh my_conf="${my_conf} --without-python --with-separate-debug-info=no" my_conf="${my_conf} --with-optimize-debug-info=no" econf --prefix=${D}/${PLANESHIFT_PREFIX} ${my_conf} \ --with-cs-prefix=/opt/planeshift/crystalspace \ --with-cel-prefix=/opt/planeshift/cel \ $(use_enable debug) \ || die "Error : econf failed" #Clear out the npcclient stuff.. it fails to build properly if ! use server ; then sed 's/SubInclude TOP src npcclient ;//' -i src/Jamfile sed 's/SubInclude TOP src server ;//' -i src/Jamfile fi sed 's/COMPILER\.CFLAGS += \"-march=i586\" ;//' -i Jamconfig sed 's/COMPILER\.CFLAGS\.optimize += .* ;//' -i Jamconfig sed 's/COMPILER\.LFLAGS\.optimize += .* ;//' -i Jamconfig jam -aq || die "failed to compile" if use server ; then jam -aq server || die "failed to compile server_static" fi if use static ; then jam -aq client_static || die "failed to compile client_static" if use server ; then jam -aq server_static || die "failed to compile server_static" fi fi } src_install() { jam install if use server ; then dodir "/usr/lib/crystalspace" cp dbmysql.so "${D}/usr/lib/crystalspace/." cp -R ./src/server/database/mysql "${D}/${PLANESHIFT_PREFIX}/bin" fi cp *_static "${D}/${PLANESHIFT_PREFIX}/bin" cp *.{xml,cfg} "${D}/${PLANESHIFT_PREFIX}/bin" cp -R data docs art "${D}/${PLANESHIFT_PREFIX}/bin" cp /opt/planeshift/crystalspace/etc/crystalspace/* "${D}/${PLANESHIFT_PREFIX}/bin/data/config" dogamesbin /usr/games/bin dogamesbin psupdater.sh dogamesbin pssetup.sh dogamesbin psclient.sh dogamesbin ${D}/${PLANESHIFT_PREFIX}/bin prepgamesdirs chgrp -R games "${D}/${PLANESHIFT_PREFIX}" chmod -R g+rw "${D}/${PLANESHIFT_PREFIX}" # Make sure new files stay in games group find "${D}/${PLANESHIFT_PREFIX}" -type d -exec chmod g+sx {} \; } pkg_postinst() { games_pkg_postinst echo ewarn "Before you can use Planeshift, you will need to update" ewarn "all of the art files. This can be done by typing: 'psupdater.sh'" ewarn einfo "Configure your client by running 'pssetup.sh'" einfo einfo "Type 'psclient.sh' to start the Planeshift client" einfo "Keep in mind, you will need to be in the games group" }