# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="A simple logical game with elements of move strategy" HOMEPAGE="http://www.babala.org/" SRC_URI="http://download.babala.org/v${PV}/InstallBabala.sh" LICENSE="Babala" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" LANGS="cs de" for X in ${LANGS} ; do IUSE="${IUSE} linguas_${X}" done RDEPEND="x11-apps/xmessage x86? ( =x11-libs/gtk+-2* ) amd64? ( app-emulation/emul-linux-x86-gtklibs )" DEPEND="" src_unpack() { cp ${DISTDIR}/${A} . sed -i -e "s/tail +13/tail -n +13/" ${A} chmod +x ${A} ./${A} # sed -i -e "s:${WORKDIR}:/opt:" ${P}/babala cat > ${P}/babala < /dev/null if [ \$? == 1 ]; then rm -f ~/.babala || { xmessage -center \\ "Cannot remove ~/.babala, exiting. Please correct the problem manually."; exit 1; } mkdir ~/.babala else xmessage -center \\ "~/.babala is not a directory, exiting. Please correct the problem manually."; exit 1; fi fi else mkdir ~/.babala fi cd ~/.babala if [ ! -e .${P} ]; then mkdir bin cd bin ln -sf /opt/${P}/bin/babala cd .. mkdir share cd share if [ -e /opt/${P}/share/locale ]; then ln -sf /opt/${P}/share/locale fi mkdir babala cd babala ln -sf /opt/${P}/share/babala/pixmaps ln -sf /opt/${P}/share/babala/help* . ln -sf /opt/${P}/share/babala/license cd ../.. touch .${P} fi cd bin exec ./babala EOF } src_install() { dogamesbin babala insinto /opt/${P}/share/babala doins share/babala/* insinto /opt/${P}/share/babala/pixmaps doins share/babala/pixmaps/* insinto /opt/${P}/share/babala/pixmaps for X in ${LANGS} ; do if use linguas_${X}; then insinto /opt/${P}/share/locale/${X}/LC_MESSAGES/ doins share/locale/${X}/LC_MESSAGES/babala.mo fi done exeinto /opt/${P}/bin doexe bin/babala newicon ${FILESDIR}/icon.png ${PN}.png make_desktop_entry "${GAMES_BINDIR}/babala" "Babala" "${PN}" "Game;StrategyGame;" "~/.babala" prepgamesdirs }