/[gentoo-x86]/net-misc/electrum/electrum-1.7.ebuild
Gentoo

Contents of /net-misc/electrum/electrum-1.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Mar 22 11:23:14 2013 UTC (17 months, 4 weeks ago) by blueness
Branch: MAIN
Changes since 1.1: +5 -4 lines
Fix files deleted for USE=qt or gtk, thanks Maks Verver, bug #462532

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/electrum/electrum-1.7.ebuild,v 1.1 2013/03/19 12:39:21 blueness Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python{2_6,2_7} )
8
9 inherit eutils distutils-r1 gnome2-utils
10
11 MY_P=Electrum-${PV}
12 DESCRIPTION="User friendly Bitcoin client"
13 HOMEPAGE="http://electrum.org/"
14 SRC_URI="http://download.electrum.org/download/${MY_P}.tar.gz"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="gtk qt4"
20 REQUIRED_USE="|| ( gtk qt4 )"
21
22 LANGS="br cs de eo es fr it lv nl ru sl vi zh"
23
24 for X in ${LANGS}; do
25 IUSE+=" linguas_${X}"
26 done
27 unset X
28
29 RDEPEND="
30 dev-python/setuptools
31 dev-python/ecdsa
32 dev-python/slowaes
33 gtk? ( dev-python/pygtk:2 )
34 qt4? ( dev-python/PyQt4 )"
35
36 S=${WORKDIR}/${MY_P}
37
38 DOCS="RELEASE-NOTES"
39
40 src_prepare() {
41 # Prevent icon from being installed in the wrong location:
42 sed -i '/electrum\.png/ d' setup.py || die
43 sed -i "s:^Icon=.*:Icon=${PN}:" "${PN}.desktop" || die
44
45 # Remove unrequested localization files:
46 local lang
47 for lang in ${LANGS#en}; do
48 if use linguas_$lang; then
49 test -f "locale/$lang/LC_MESSAGES/${PN}.mo" || die
50 else
51 rm -r "locale/$lang" || die
52 fi
53 done
54
55 # Remove unrequested GUI implementations:
56 if use !gtk; then
57 rm gui/gui_gtk.py || die
58 fi
59 if use !qt4; then
60 rm gui/gui_{classic,lite}.py || die
61 sed -i "/config.get('gui','classic')/s/classic/gtk/" electrum \
62 || die
63 fi
64
65 distutils-r1_src_prepare
66 }
67
68 src_install() {
69 doicon -s 64 icons/${PN}.png
70 distutils-r1_src_install
71 }
72
73 pkg_preinst() {
74 gnome2_icon_savelist
75 }
76
77 pkg_postinst() {
78 gnome2_icon_cache_update
79 }
80
81 pkg_postrm() {
82 gnome2_icon_cache_update
83 }

  ViewVC Help
Powered by ViewVC 1.1.20