blob: f8143921674d5ceea8009512108244fa333d7d88 (
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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
}
|