summaryrefslogtreecommitdiff
blob: c21b7a3880fcc6b508025f19b2ee180bed1df1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="3"

MY_PN="GSquares"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="GTK-Based Strategy Game"
HOMEPAGE="http://dibyendu.github.com/GSquares/"
SRC_URI="mirror://sourceforge/project/gsquare/${MY_PN}/Version%20${PV}/${MY_P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="x11-libs/gtk+:2
	dev-libs/glib:2
	x11-libs/cairo"
DEPEND="${RDEPEND}
	sys-apps/sed"

S="${WORKDIR}"/${MY_P}

src_prepare() {
	sed -e "s|/share/|/share/${MY_PN}/|g" \
			-i "${S}"/src/paths.h.in || die
}

src_configure() {
	econf --datadir=/usr/share/${MY_PN}
}

src_install() {
	emake DESTDIR="${D}" install || die

	# Fix icon location
	sed 's|Icon=gsquares.png|Icon=/usr/share/GSquares/pixmaps/icon.png|' \
			-i "${D}"/usr/share/${MY_PN}/games/${MY_PN}.desktop || die

	# Move .desktop file in place
	dodir /usr/share/applications || die
	mv "${D}"/usr/share/{${MY_PN}/games/${MY_PN}.desktop,applications} || die
	rmdir "${D}"/usr/share/${MY_PN}/games || die
}