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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon May 4 13:11:53 2015 UTC (4 years, 7 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Drop older versions.

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

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/electrum/electrum-2.0.0.ebuild,v 1.2 2015/03/14 19:53:20 blueness Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python2_7 )
8 PYTHON_REQ_USE="ncurses?"
9
10 inherit eutils distutils-r1 gnome2-utils
11
12 MY_P=Electrum-2.0
13 DESCRIPTION="User friendly Bitcoin client"
14 HOMEPAGE="https://electrum.org/"
15 SRC_URI="https://electrum.org/download/${MY_P}.tar.gz"
16
17 LICENSE="GPL-3"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 LINGUAS="ar_SA cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ky_KG lv_LV nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH vi_VN zh_CN"
21
22 IUSE="aliases amodem cli coinbase_com cosign +fiat graph greenaddress_it gtk3 ncurses qrcode +qt4 sync trustedcoin_com vkb"
23
24 for lingua in ${LINGUAS}; do
25 IUSE+=" linguas_${lingua}"
26 done
27
28 REQUIRED_USE="
29 || ( cli gtk3 ncurses qt4 )
30 aliases? ( qt4 )
31 amodem? ( qt4 )
32 coinbase_com? ( qt4 )
33 cosign? ( qt4 )
34 fiat? ( qt4 )
35 graph? ( qt4 )
36 greenaddress_it? ( qt4 )
37 qrcode? ( qt4 )
38 sync? ( qt4 )
39 trustedcoin_com? ( qt4 )
40 vkb? ( qt4 )
41 "
42
43 RDEPEND="
44 dev-python/setuptools[${PYTHON_USEDEP}]
45 >=dev-python/ecdsa-0.9[${PYTHON_USEDEP}]
46 dev-python/slowaes[${PYTHON_USEDEP}]
47 dev-python/pbkdf2[${PYTHON_USEDEP}]
48 dev-python/requests[${PYTHON_USEDEP}]
49 dev-python/pyasn1[${PYTHON_USEDEP}]
50 dev-python/pyasn1-modules[${PYTHON_USEDEP}]
51 dev-python/tlslite[${PYTHON_USEDEP}]
52 dev-python/qrcode[${PYTHON_USEDEP}]
53 dev-python/socksipy[${PYTHON_USEDEP}]
54 dev-libs/protobuf[python,${PYTHON_USEDEP}]
55 dev-python/six[${PYTHON_USEDEP}]
56 gtk3? (
57 dev-python/pygobject:3[${PYTHON_USEDEP}]
58 x11-libs/gtk+:3[introspection]
59 )
60 qrcode? ( media-gfx/zbar[python,v4l,${PYTHON_USEDEP}] )
61 qt4? (
62 coinbase_com? ( dev-python/PyQt4[${PYTHON_USEDEP},webkit] )
63 dev-python/PyQt4[${PYTHON_USEDEP}]
64 )
65 ncurses? ( dev-lang/python )
66 aliases? ( dev-python/dnspython[${PYTHON_USEDEP}] )
67 amodem? ( dev-python/amodem[${PYTHON_USEDEP}] )
68 graph? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
69 "
70
71 S="${WORKDIR}/${MY_P}"
72
73 DOCS="RELEASE-NOTES"
74
75 src_prepare() {
76 # Don't advise using PIP
77 sed -i "s/On Linux, try 'sudo pip install zbar'/Re-emerge Electrum with the qrcode USE flag/" lib/qrscanner.py || die
78
79 # Prevent icon from being installed in the wrong location
80 sed -i '/icons/d' setup.py || die
81
82 validate_desktop_entries
83
84 # Remove unrequested localization files:
85 for lang in ${LINGUAS}; do
86 use "linguas_${lang}" && continue
87 rm -r "lib/locale/${lang}" || die
88 done
89
90 local wordlist=
91 # french is unfinished
92 for wordlist in \
93 $(usex linguas_es_ES '' spanish) \
94 $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
95 french \
96 $(usex linguas_ja_JP '' japanese) \
97 ; do
98 rm "lib/wordlist/${wordlist}.txt" || die
99 sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
100 done
101
102 # Remove unrequested GUI implementations:
103 local gui
104 for gui in \
105 $(usex cli '' stdio) \
106 $(usex gtk3 '' gtk ) \
107 $(usex qt4 '' qt ) \
108 $(usex ncurses '' text ) \
109 ; do
110 rm gui/"${gui}"* -r || die
111 done
112
113 if ! use qt4; then
114 sed -i "s/'electrum_gui\\.qt',//;/\"qt\\/themes/d" setup.py || die
115 local bestgui=$(usex gtk3 gtk $(usex ncurses text stdio))
116 sed -i "s/\(config.get('gui', \?\)'classic'/\1'${bestgui}'/" electrum || die
117 fi
118
119 local plugin
120 # btchipwallet requires python btchip module (and dev-python/pyusb)
121 # trezor requires python trezorlib module
122 for plugin in \
123 $(usex aliases '' openalias ) \
124 $(usex amodem '' audio ) \
125 btchipwallet \
126 $(usex coinbase_com '' coinbase_buyback) \
127 $(usex cosign '' cosigner_pool ) \
128 $(usex fiat '' exchange_rate ) \
129 $(usex graph '' plot ) \
130 $(usex greenaddress_it '' greenaddress_instant) \
131 $(usex sync '' labels ) \
132 trezor \
133 $(usex trustedcoin_com '' trustedcoin ) \
134 $(usex vkb '' virtualkeyboard ) \
135 ; do
136 rm plugins/"${plugin}"* || die
137 done
138
139 distutils-r1_src_prepare
140 }
141
142 src_install() {
143 doicon -s 128 icons/${PN}.png
144 distutils-r1_src_install
145 }
146
147 pkg_preinst() {
148 gnome2_icon_savelist
149 }
150
151 pkg_postinst() {
152 gnome2_icon_cache_update
153 }
154
155 pkg_postrm() {
156 gnome2_icon_cache_update
157 }

  ViewVC Help
Powered by ViewVC 1.1.20