diff options
author | Julian Ospald <hasufell@gentoo.org> | 2013-01-12 15:41:34 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2013-01-12 15:41:34 +0000 |
commit | 85f6f0b5f5ec2ac8eaf0bc981b318c91bf9898ae (patch) | |
tree | c40e8e22c72210516ed5ef1c6f45da058036e537 /games-kids/pytraffic | |
parent | tidy (diff) | |
download | gentoo-2-85f6f0b5f5ec2ac8eaf0bc981b318c91bf9898ae.tar.gz gentoo-2-85f6f0b5f5ec2ac8eaf0bc981b318c91bf9898ae.tar.bz2 gentoo-2-85f6f0b5f5ec2ac8eaf0bc981b318c91bf9898ae.zip |
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)
Diffstat (limited to 'games-kids/pytraffic')
-rw-r--r-- | games-kids/pytraffic/ChangeLog | 10 | ||||
-rw-r--r-- | games-kids/pytraffic/files/pytraffic | 6 | ||||
-rw-r--r-- | games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild | 87 |
3 files changed, 101 insertions, 2 deletions
diff --git a/games-kids/pytraffic/ChangeLog b/games-kids/pytraffic/ChangeLog index bed73cd8ea5b..e98dafec22af 100644 --- a/games-kids/pytraffic/ChangeLog +++ b/games-kids/pytraffic/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-kids/pytraffic -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-kids/pytraffic/ChangeLog,v 1.13 2011/04/06 20:04:12 arfrever Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-kids/pytraffic/ChangeLog,v 1.14 2013/01/12 15:41:34 hasufell Exp $ + +*pytraffic-2.5.4-r1 (12 Jan 2013) + + 12 Jan 2013; Julian Ospald <hasufell@gentoo.org> +pytraffic-2.5.4-r1.ebuild, + +files/pytraffic: + migrate to distutils-r1, respect FHS, support multiple ABI 06 Apr 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> pytraffic-2.5.4.ebuild: diff --git a/games-kids/pytraffic/files/pytraffic b/games-kids/pytraffic/files/pytraffic new file mode 100644 index 000000000000..30ab25196ce7 --- /dev/null +++ b/games-kids/pytraffic/files/pytraffic @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +import os +os.chdir("@GAMES_DATADIR@") +import pytraffic.Main + diff --git a/games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild b/games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild new file mode 100644 index 000000000000..cd079a0557b8 --- /dev/null +++ b/games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-kids/pytraffic/pytraffic-2.5.4-r1.ebuild,v 1.1 2013/01/12 15:41:34 hasufell Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_6 python2_7 ) + +inherit eutils gnome2-utils python-utils-r1 python-r1 distutils-r1 games + +DESCRIPTION="Python version of the board game Rush Hour" +HOMEPAGE="http://freecode.com/projects/pytraffic" +SRC_URI="http://alpha.uhasselt.be/Research/Algebra/Members/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="media-libs/libsdl[audio] + media-libs/sdl-mixer" +RDEPEND="${DEPEND} + dev-python/pygtk" + +python_prepare_all() { + distutils-r1_python_prepare_all + + # FHS compliance + sed -i \ + -e 's#return os.path.join(exec_dir,path)#return os.path.join(os.getcwd(),path)#' \ + Misc.py || die + + sed \ + -e "s#@GAMES_DATADIR@#${GAMES_DATADIR}/${PN}#" \ + "${FILESDIR}"/${PN} > "${T}"/${PN} || die +} + +python_install() { + # install modules manually, build system broken + python_moduleinto ${PN} + python_domodule "${BUILD_DIR}"/lib/. + + # allow to import the stuff as module + touch "${D}$(python_get_sitedir)"/${PN}/__init__.py || die + + # install python wrapper script to handle multiple ABI properly + python_scriptinto "${GAMES_BINDIR}" + python_doscript "${T}"/${PN} +} + +python_install_all() { + insinto "${GAMES_DATADIR}"/${PN} + doins -r doc config.db extra_themes icons libglade music sound_test themes ttraffic.levels + + doicon -s 64 icons/64x64/${PN}.png + make_desktop_entry ${PN} PyTraffic + + dodoc AUTHORS CHANGELOG README + + prepgamesdirs +} + +src_prepare() { + distutils-r1_src_prepare +} + +src_compile() { + distutils-r1_src_compile +} + +src_install() { + distutils-r1_src_install +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} |