x11-plugins/purple-mattermost: drop old
[gentoo.git] / games-action / slune / slune-1.0.15-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit gnome2-utils distutils-r1 games
9
10 DESCRIPTION="A 3D action game with multiplayer mode and amazing graphics"
11 HOMEPAGE="http://oomadness.tuxfamily.org/en/slune/"
12 SRC_URI="http://download.gna.org/slune/Slune-${PV}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 RDEPEND="virtual/opengl
20         >=media-libs/libsdl-1.2.6
21         >=dev-python/soya-0.9
22         >=dev-python/py2play-0.1.9
23         >=dev-python/pyopenal-0.1.3
24         >=dev-python/pyogg-1.1
25         >=dev-python/pyvorbis-1.1"
26 DEPEND="${RDEPEND}"
27
28 S=${WORKDIR}/Slune-${PV}
29
30 python_install() {
31         distutils-r1_python_install \
32                 --install-scripts="${GAMES_BINDIR}" \
33                 --install-data="${GAMES_DATADIR}" \
34                 --install-lib="$(python_get_sitedir)"
35
36         # FHS broke the logic, fix it
37         local i
38         for i in $(ls -I locale "${ED}${GAMES_DATADIR}"/${PN}) ; do
39                 dosym "${GAMES_DATADIR}/${PN}/${i}" "$(python_get_sitedir)/${PN}/${i}"
40         done
41 }
42
43 src_prepare() {
44         distutils-r1_src_prepare
45 }
46
47 src_compile() {
48         distutils-r1_src_compile
49 }
50
51 src_install() {
52         distutils-r1_src_install
53
54         # fix install dest of locales
55         mv "${ED}${GAMES_DATADIR}"/${PN}/locale "${ED}"/usr/share/locale || die
56
57         newicon -s 48 images/${PN}.48.png ${PN}.png
58         make_desktop_entry ${PN} "Slune"
59
60         prepgamesdirs
61 }
62
63 pkg_preinst() {
64         games_pkg_preinst
65         gnome2_icon_savelist
66 }
67
68 pkg_postinst() {
69         games_pkg_postinst
70         gnome2_icon_cache_update
71 }
72
73 pkg_postrm() {
74         gnome2_icon_cache_update
75 }