/[gentoo-x86]/games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild
Gentoo

Contents of /games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Jan 12 15:41:34 2013 UTC (2 years, 6 months ago) by hasufell
Branch: MAIN
migrate to distutils-r1, respect FHS, support multiple ABI

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-kids/pytraffic/pytraffic-2.5.4.ebuild,v 1.8 2011/04/12 17:15:51 arfrever Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_6 python2_7 )
8
9 inherit eutils gnome2-utils python-utils-r1 python-r1 distutils-r1 games
10
11 DESCRIPTION="Python version of the board game Rush Hour"
12 HOMEPAGE="http://freecode.com/projects/pytraffic"
13 SRC_URI="http://alpha.uhasselt.be/Research/Algebra/Members/${PN}/${P}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86"
18 IUSE=""
19
20 DEPEND="media-libs/libsdl[audio]
21 media-libs/sdl-mixer"
22 RDEPEND="${DEPEND}
23 dev-python/pygtk"
24
25 python_prepare_all() {
26 distutils-r1_python_prepare_all
27
28 # FHS compliance
29 sed -i \
30 -e 's#return os.path.join(exec_dir,path)#return os.path.join(os.getcwd(),path)#' \
31 Misc.py || die
32
33 sed \
34 -e "s#@GAMES_DATADIR@#${GAMES_DATADIR}/${PN}#" \
35 "${FILESDIR}"/${PN} > "${T}"/${PN} || die
36 }
37
38 python_install() {
39 # install modules manually, build system broken
40 python_moduleinto ${PN}
41 python_domodule "${BUILD_DIR}"/lib/.
42
43 # allow to import the stuff as module
44 touch "${D}$(python_get_sitedir)"/${PN}/__init__.py || die
45
46 # install python wrapper script to handle multiple ABI properly
47 python_scriptinto "${GAMES_BINDIR}"
48 python_doscript "${T}"/${PN}
49 }
50
51 python_install_all() {
52 insinto "${GAMES_DATADIR}"/${PN}
53 doins -r doc config.db extra_themes icons libglade music sound_test themes ttraffic.levels
54
55 doicon -s 64 icons/64x64/${PN}.png
56 make_desktop_entry ${PN} PyTraffic
57
58 dodoc AUTHORS CHANGELOG README
59
60 prepgamesdirs
61 }
62
63 src_prepare() {
64 distutils-r1_src_prepare
65 }
66
67 src_compile() {
68 distutils-r1_src_compile
69 }
70
71 src_install() {
72 distutils-r1_src_install
73 }
74
75 pkg_preinst() {
76 games_pkg_preinst
77 gnome2_icon_savelist
78 }
79
80 pkg_postinst() {
81 games_pkg_postinst
82 gnome2_icon_cache_update
83 }
84
85 pkg_postrm() {
86 gnome2_icon_cache_update
87 }

  ViewVC Help
Powered by ViewVC 1.1.20