1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 PYTHON_USE_WITH="threads"
13 DESCRIPTION="Simple Gtk+ Interface to Mount ISO, IMG, BIN, MDF and NRG Image files without burning to disk"
14 HOMEPAGE="http://www.marcus-furius.com/?page_id=170"
15 SRC_URI="http://launchpad.net/${PN}/python/${PV}/+download/${MY_P}.tar.gz"
19 KEYWORDS="~amd64 ~x86"
22 RDEPEND="dev-python/pygobject:2
27 brasero? ( app-cdr/brasero )"
29 S="${WORKDIR}/${MY_P}"
32 python_set_active_version 2
37 # The tarball ships *.pyc files, but we don't want to install them, do we?
38 rm src/*.pyc || die "rm failed"
40 # Change python binary call and path to main in furiusisomount
41 sed -e 's:^python "\(src/main.py\)":'$(PYTHON -a)' "/usr/share/'${PN}'/\1":' -i ${PN} || die "sed failed"
43 # Disable the nautilus radio button because we can't use it anyway, Gentoo does not have nautilus-cd-burner
44 sed -e '/<widget class="GtkRadioButton" id="radiobutton_nautilus">/ a\
45 <property name="sensitive">False</property>' -i res/main_window.glade
47 # If brasero is disabled, we disable all burning-related widgets
48 if ! use brasero; then
49 sed -e '/<widget class="GtkRadioButton" id="radiobutton_brasero">/ a\
50 <property name="sensitive">False</property>' -i res/main_window.glade
51 sed -e "s/self.interface.get_widget('button_burn').set_sensitive(True)/#&/" -i src/main.py
54 python_convert_shebangs -r 2 src
58 insinto /usr/share/${PN}/
59 doins -r src res po pix locale || die "doins failed"
61 dobin ${PN} || die "dobin failed"
62 doicon pix/${PN}.png || die "doicon failed"
63 newmenu app.desktop ${PN}.desktop || die "newmenu failed"
67 python_mod_optimize /usr/share/${PN}/src/
71 python_mod_cleanup /usr/share/${PN}/src/