]> Pileus Git - ~andy/sunrise/blob - app-cdr/furiusisomount/furiusisomount-0.11.3.1.ebuild
app-cdr/furiusisomount: Adding ~amd64 keyword
[~andy/sunrise] / app-cdr / furiusisomount / furiusisomount-0.11.3.1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2:2.5"
8 PYTHON_USE_WITH="threads"
9
10 inherit eutils python
11
12 MY_P=${PN}_${PV}
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"
16
17 LICENSE="GPL-3"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="brasero"
21
22 RDEPEND="dev-python/pygobject:2
23         dev-python/pygtk:2
24         sys-fs/fuseiso
25         gnome-base/nautilus
26         x11-libs/gksu
27         brasero? ( app-cdr/brasero )"
28
29 S="${WORKDIR}/${MY_P}"
30
31 pkg_setup() {
32         python_set_active_version 2
33         python_pkg_setup
34 }
35
36 src_prepare() {
37         # The tarball ships *.pyc files, but we don't want to install them, do we?
38         rm src/*.pyc || die "rm failed"
39
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"
42
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
46
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
52         fi
53
54         python_convert_shebangs -r 2 src
55 }
56
57 src_install() {
58         insinto /usr/share/${PN}/
59         doins -r src res po pix locale || die "doins failed"
60
61         dobin ${PN} || die "dobin failed"
62         doicon pix/${PN}.png || die "doicon failed"
63         newmenu app.desktop ${PN}.desktop || die "newmenu failed"
64 }
65
66 pkg_postinst() {
67         python_mod_optimize /usr/share/${PN}/src/
68 }
69
70 pkg_postrm() {
71         python_mod_cleanup /usr/share/${PN}/src/
72 }