]>
Commit | Line | Data |
---|---|---|
a6c196cc AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
c3ae2eb5 | 5 | |
5db57e87 | 6 | %define module pycoin |
a6c196cc | 7 | Summary: Bitcoin utility library |
6ce7b511 | 8 | Summary(pl.UTF-8): Biblioteka narzędziowa Bitcoin |
a6c196cc AM |
9 | Name: python-pycoin |
10 | Version: 0.24 | |
7bac6d16 | 11 | Release: 14 |
a6c196cc | 12 | License: MIT |
6ce7b511 JB |
13 | Group: Libraries/Python |
14 | #Source0Download: https://github.com/richardkiss/pycoin/releases | |
15 | #TODO: use https://github.com/richardkiss/pycoin/archive/%{version}/pycoin-%{version}.tar.gz | |
a6c196cc AM |
16 | Source0: https://github.com/richardkiss/pycoin/archive/%{version}.tar.gz |
17 | # Source0-md5: 512f17827323eb1ba2bfe7952829575d | |
18 | URL: https://github.com/richardkiss/pycoin | |
6ce7b511 | 19 | BuildRequires: rpmbuild(macros) >= 1.714 |
c3ae2eb5 | 20 | BuildRequires: rpm-pythonprov |
a6c196cc AM |
21 | %if %{with python2} |
22 | BuildRequires: python-devel | |
23 | BuildRequires: python-modules | |
6ce7b511 | 24 | BuildRequires: python-setuptools |
a6c196cc AM |
25 | %endif |
26 | %if %{with python3} | |
27 | BuildRequires: python3-2to3 | |
28 | BuildRequires: python3-devel | |
29 | BuildRequires: python3-modules | |
6ce7b511 | 30 | BuildRequires: python3-setuptools |
a6c196cc | 31 | %endif |
6ce7b511 | 32 | Requires: python-modules |
a6c196cc AM |
33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This is an implementation of a bunch of utility routines that may be | |
38 | useful when dealing with Bitcoin stuff. | |
39 | ||
6ce7b511 JB |
40 | %description -l pl.UTF-8 |
41 | Implementacja zbioru funkcji narzędziowych, które mogą być przydatne | |
42 | przy operowaniu na Bitcoinach. | |
43 | ||
44 | %package -n python3-%{module} | |
a6c196cc | 45 | Summary: Bitcoin utility library |
6ce7b511 | 46 | Summary(pl.UTF-8): Biblioteka narzędziowa Bitcoin |
a6c196cc | 47 | Group: Libraries/Python |
6ce7b511 | 48 | Requires: python3-modules |
a6c196cc AM |
49 | |
50 | %description -n python3-%{module} | |
51 | This is an implementation of a bunch of utility routines that may be | |
52 | useful when dealing with Bitcoin stuff. | |
53 | ||
6ce7b511 JB |
54 | %description -n python3-%{module} -l pl.UTF-8 |
55 | Implementacja zbioru funkcji narzędziowych, które mogą być przydatne | |
56 | przy operowaniu na Bitcoinach. | |
57 | ||
58 | %package -n %{module} | |
a6c196cc | 59 | Summary: Bitcoin utility library - tools |
6ce7b511 | 60 | Summary(pl.UTF-8): Biblioteka narzędziowa Bitcoin - narzędzia |
a6c196cc | 61 | Group: Libraries/Python |
060733dd AM |
62 | Requires: python%{?with_python3:3} |
63 | Requires: python%{?with_python3:3}-%{module} = %{version}-%{release} | |
64 | Requires: python%{?with_python3:3}-distribute | |
a6c196cc AM |
65 | |
66 | %description -n %{module} | |
6ce7b511 JB |
67 | Tools that use pycoin library. |
68 | ||
69 | %description -n %{module} -l pl.UTF-8 | |
70 | Narzędzia wykorzystująca bibliotekę pycoin. | |
a6c196cc AM |
71 | |
72 | %prep | |
73 | %setup -q -n pycoin-%{version} | |
74 | ||
75 | %build | |
76 | %if %{with python2} | |
5db57e87 | 77 | %py_build |
a6c196cc | 78 | %endif |
6ce7b511 | 79 | |
a6c196cc | 80 | %if %{with python3} |
5db57e87 | 81 | %py3_build |
a6c196cc AM |
82 | %endif |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
6ce7b511 | 86 | |
a6c196cc AM |
87 | %if %{with python2} |
88 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} | |
5db57e87 | 89 | %py_install |
a6c196cc AM |
90 | %endif |
91 | ||
92 | %if %{with python3} | |
93 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
5db57e87 | 94 | %py3_install |
a6c196cc AM |
95 | %endif |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %if %{with python2} | |
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc CHANGES CREDITS README.md | |
a6c196cc AM |
104 | %{py_sitescriptdir}/%{module} |
105 | %{py_sitescriptdir}/*egg-info | |
c3ae2eb5 | 106 | %{_examplesdir}/python-%{module}-%{version} |
a6c196cc AM |
107 | %endif |
108 | ||
109 | %if %{with python3} | |
110 | %files -n python3-%{module} | |
111 | %defattr(644,root,root,755) | |
112 | %doc CHANGES CREDITS README.md | |
a6c196cc AM |
113 | %{py3_sitescriptdir}/%{module} |
114 | %{py3_sitescriptdir}/*egg-info | |
c3ae2eb5 | 115 | %{_examplesdir}/python3-%{module}-%{version} |
a6c196cc AM |
116 | %endif |
117 | ||
118 | %files -n %{module} | |
119 | %defattr(644,root,root,755) | |
120 | %attr(755,root,root) %{_bindir}/bu | |
121 | %attr(755,root,root) %{_bindir}/genwallet | |
122 | %attr(755,root,root) %{_bindir}/spend |