# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils MY_P="twind-${PV}" S="${WORKDIR}/${MY_P}" DESCRIPTION="Match and remove all of the blocks before time runs out" HOMEPAGE="http://twind.sourceforge.net/" SRC_URI="mirror://sourceforge/twind/${MY_P}.tar.gz" KEYWORDS="~x86" LICENSE="GPL-2" SLOT="0" IUSE="" DEPEND="virtual/x11 >=media-libs/libsdl >=media-libs/sdl-mixer >=media-libs/sdl-image" src_unpack() { unpack ${A} cd ${S} sed -i \ -e "s:/usr/local/bin/:${GAMES_BINDIR}/:" \ -e "s:/usr/local/share/games/twind/:${GAMES_DATADIR}/twindistress/:" \ -e "s:/var/lib/games/twind/:${GAMES_DATADIR}/twindistress/lib/:" \ Makefile || die "sed Makefile failed" } src_install() { dogamesbin twind || die "dogamesbin failed" dodir "${GAMES_DATADIR}/${PN}/lib" || die "dodir failed" insinto "${GAMES_DATADIR}/${PN}/graphics" doins graphics/*.png || die "doins failed (graphics)" insinto "${GAMES_DATADIR}/${PN}/music" doins music/*.ogg || die "doins failed (music)" insinto "${GAMES_DATADIR}/${PN}/sound" doins sound/*.wav || die "doins failed (sounds)" insinto /usr/share/pixmaps doins graphics/twind.png || die "doins failed (icon)" make_desktop_entry twind "Twin Distress" twind.png || die \ "make_desktop_entry failed" dodoc AUTHORS CREDITS ChangeLog NEWS README TODO || die "dodoc failed" prepalldocs prepgamesdirs # does the following somehow create a security risk? # (i do it so it can save the high scores) fperms 770 "${GAMES_DATADIR}/${PN}/lib/" || die "fperms failed" } pkg_postinst() { games_pkg_postinst einfo "If sdl_mixer isn't built with ogg vorbis support, then you won't" einfo "be able to hear the music" echo }