]> git.pld-linux.org Git - SPECS.git/blob - electrum.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / electrum.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module
6
7 %define         egg_name        Electrum
8 Summary:        Bitcoin Wallet
9 Summary(pl.UTF-8):      Zarządca portwala Bitcoin
10 Name:           electrum
11 Version:        2.9.3
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 Source0:        https://download.electrum.org/%{version}/Electrum-%{version}.tar.gz
16 # Source0-md5:  17257d2ee01454283a3324392b85eef5
17 URL:            https://electrum.org
18 BuildRequires:  python-PySocks >= 1.6.6
19 BuildRequires:  python-ecdsa > 0.9
20 BuildRequires:  python-jsonrpclib
21 BuildRequires:  python-pbkdf2
22 BuildRequires:  python-pyaes
23 BuildRequires:  python-qrcode
24 BuildRequires:  python-requests
25 BuildRequires:  python-protobuf
26 BuildRequires:  python-six
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29
30 %if %{with python2}
31 BuildRequires:  python-modules
32 BuildRequires:  python-setuptools
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-modules
36 BuildRequires:  python3-setuptools
37 %endif
38 # when using /usr/bin/env or other in-place substitutions
39 #BuildRequires: sed >= 4.0
40 # replace with other requires if defined in setup.py
41 Requires:       python-modules
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Lightweight Bitcoin wallet
47
48 # %%description -l pl.UTF-8
49
50 %package -n python3-%{pypi_name}
51 Summary:        -
52 Summary(pl.UTF-8):      -
53 Group:          Libraries/Python
54 Requires:       python3-modules
55
56 %description -n python3-%{pypi_name}
57
58 %description -n python3-%{pypi_name} -l pl.UTF-8
59
60 %package apidocs
61 Summary:        API documentation for Python %{module} module
62 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
63 Group:          Documentation
64
65 %description apidocs
66 API documentation for Pythona %{module} module.
67
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API modułu Pythona %{module}.
70
71 %prep
72 %setup -q -n Electrum-%{version}
73
74 %build
75 %if %{with python2}
76 %py_build %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %py3_build %{?with_tests:test}
81 %endif
82
83 %if %{with doc}
84 cd docs
85 %{__make} -j1 html
86 rm -rf _build/html/_sources
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 # Fix for strange *.desktop pixmap location rules in setup.py
93 export XDG_DATA_HOME=%{_datadir}
94 %if %{with python2}
95 %py_install
96 %py_postclean
97 %endif
98
99 %if %{with python3}
100 %py3_install
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %files
108 %defattr(644,root,root,755)
109 %doc AUTHORS README.rst RELEASE-NOTES
110 %attr(755,root,root) %{_bindir}/electrum
111 %{_desktopdir}/electrum.desktop
112 %{_pixmapsdir}/electrum.png
113 %{py_sitescriptdir}/electrum
114 %{py_sitescriptdir}/electrum_gui
115 %{py_sitescriptdir}/electrum_plugins
116 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
117 %endif
118
119 %if %{with python3}
120 %files -n python3-%{pypi_name}
121 %defattr(644,root,root,755)
122 %doc AUTHORS README.rst RELEASE-NOTES
123 #%%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
124 %endif
125
126 %if %{with doc}
127 %files apidocs
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/*
130 %endif
This page took 1.086989 seconds and 3 git commands to generate.