www-client/pybugz: amd64 stable wrt bug #577498
[gentoo.git] / games-board / capicity / capicity-1.0.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils gnome2-utils qmake-utils games
7
8 DESCRIPTION="A monopd compatible boardgame to play Monopoly-like games (previously named capitalism)"
9 HOMEPAGE="http://linux-ecke.de/CapiCity/"
10 SRC_URI="dedicated? ( mirror://sourceforge/project/capitalism/Capi%20City/${PV}/Capid_${PV}.tar.gz )
11         !dedicated? ( mirror://sourceforge/project/capitalism/Capi%20City/${PV}/CapiCity_${PV}.tar.gz )"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="dedicated"
17
18 RDEPEND="
19         dev-qt/qtcore:4
20         dev-qt/qtscript:4
21         !dedicated? ( dev-qt/qtgui:4 )"
22 DEPEND="${RDEPEND}"
23
24 src_unpack() {
25         default
26         S=${WORKDIR}/$(usex dedicated Capid CapiCity)_${PV}
27 }
28
29 src_configure() {
30         if use dedicated ; then
31                 eqmake4 Capid.pro
32         else
33                 eqmake4 CapiCity.pro
34         fi
35 }
36
37 src_install() {
38         local res
39
40         if use dedicated ; then
41                 dogamesbin Capid
42                 dodoc doc/*
43         else
44                 dogamesbin CapiCity
45                 dodoc changelog README
46
47                 for res in 16 22 24 32 48 64; do
48                         newicon -s ${res} icons/${res}x${res}.png ${PN}.png
49                 done
50
51                 make_desktop_entry CapiCity "Capi City"
52         fi
53         prepgamesdirs
54 }
55
56 pkg_preinst() {
57         games_pkg_preinst
58         use dedicated || gnome2_icon_savelist
59 }
60
61 pkg_postinst() {
62         games_pkg_postinst
63         use dedicated || gnome2_icon_cache_update
64 }
65
66 pkg_postrm() {
67         use dedicated || gnome2_icon_cache_update
68 }