sys-process/tini: remove old versions
[gentoo.git] / games-arcade / opentyrian / opentyrian-2.1.20130907.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit base games
6
7 DESCRIPTION="Open-source port of the DOS game Tyrian, vertical scrolling shooter"
8 HOMEPAGE="https://bitbucket.org/opentyrian/opentyrian/wiki/Home"
9 SRC_URI="http://darklomax.org/tyrian/tyrian21.zip
10          http://www.camanis.net/${PN}/releases/${P}-src.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE=""
16
17 RDEPEND="media-libs/libsdl
18         media-libs/sdl-net"
19 # Yes, mercurial is needed to set the build version stamp.
20 DEPEND="${RDEPEND}
21         app-arch/unzip
22         dev-vcs/mercurial"
23 PATCHES=(
24         "${FILESDIR}/${PV}-datapath.diff"
25         "${FILESDIR}/${PV}-cflag-idiocy.diff"
26 )
27
28 src_compile() {
29         emake DATA_PATH="${GAMES_DATADIR}/${PN}" || die "Compilation failed"
30 }
31
32 src_install() {
33         dogamesbin opentyrian || die "Failed to install game binary"
34         dosym "${GAMES_BINDIR}/opentyrian" "${GAMES_BINDIR}/tyrian" || die "Failed to symlink"
35         dodoc CREDITS NEWS README || die "Failed to install documentation"
36         domenu linux/opentyrian.desktop || die "Failed to install desktop file"
37         for i in linux/icons/*.png ; do
38                 local size=`echo ${i} | sed -e 's:.*-\([0-9]\+\).png:\1:'`
39                 insinto /usr/share/icons/hicolor/${size}x${size}/apps
40                 newins ${i} opentyrian.png || die "Failed to install program icon"
41         done
42         insinto "${GAMES_DATADIR}/${PN}"
43         cd "${WORKDIR}/tyrian21"
44         doins * || die "Failed to install game data"
45         prepgamesdirs
46 }