Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help creating an ebuild for Wah!cade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Sun May 21, 2006 3:05 pm    Post subject: need help creating an ebuild for Wah!cade Reply with quote

Hi. I am intrested in using Wah!cade (mame front-end) http://gnomefiles.org/app.php?soft_id=1198.

I do create ebuilds for different apps that I use personally quite with ease, but when it comes to python apps thats when the trouble starts. Therefore I need some help on this one.

This is what I created so far, but it don't really work as it should
Code:
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:

inherit python

DESCRIPTION="Frontend for the M.A.M.E. arcade game emulator"
HOMEPAGE="http://www.anti-particle.com/wahcade.shtml"
SRC_URI="http://www.anti-particle.com/projects/wahcade/${P}.tar.gz"

LICENSE="LGPL-2"
SLOT="2"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND=">=dev-lang/python-2.4
   >=dev-python/pygtk-2.6
   dev-python/elementtree
   >=dev-python/psyco-1.3
   >=x11-libs/gtk+-2.6
   games-emulation/xmame"

DEPEND="${RDEPEND}"

S="${WORKDIR}/${PN}"

src_install() {
   python_version

   cd ${S}
   dodir "/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}"
   rm install setup.py
   cp -R * "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}"

   doicon pixmaps/${PN}.png
   insinto /usr/share/applications
   doins ${PN}.desktop

   insinto /usr/share/doc/${P}
   doins -r doc

   #wahcade start script
   echo "#!/bin/bash" > ${PN}.py
   echo "cd /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}/" >> ${PN}.py
   echo "exec $(which python) /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}/${PN} \$*" >> ${PN}.py
   chmod 755 ${PN}.py
   exeinto /usr/bin
   doexe ${PN}.py
}

#pkg_preinst () {
#    #make them work
#    #python_mod_compile
#    #python_mod_optimize
#   python -c "import compileall; compileall.compile_dir('/usr/lib/python${PYVER}/site-packages/${PN}')"
#
#}

pkg_postinst () {
   echo "If you're upgrading from v0.9, you'll need to redo your cpviewer.ini file "
   echo " (see wahcade/config.dist/cpviewer.ini) "
   echo " and copy wahcade/config.dist/layouts/cpviewer to ~/wahcade/layouts."

}

save it as wahcade-0.10.ebuild


Thanks a lot


EDIT: There is also bug entry for this https://bugs.gentoo.org/show_bug.cgi?id=131188, so if you write a working ebuild feel free to post it there instead
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum