forked from davvid/python-jsonrpc
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpython-jsonrpc.spec.in
75 lines (61 loc) · 1.69 KB
/
python-jsonrpc.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%if 0%{?rhel} == 9
%global with_python3 1
%endif
%{?scl:%global _scl_prefix /disk1/scl}
%if 0%{?with_python3}
%{?scl:%scl_package python3-jsonrpc}
%else
%{?scl:%scl_package python-jsonrpc}
%endif
%{!?scl:%global pkg_name %{name}}
%if 0%{?with_python3}
Name: %{?scl_prefix}python3-jsonrpc
%else
Name: %{?scl_prefix}python-jsonrpc
%endif
Version: __VERSION__
Release: __RELEASE__%{?dist}
Summary: python implementation of the JSON RPC protocol
Group: System Environment/Libraries
License: LGPL
URL: https://github.com/davvid/%{pkg_name}
Source0: https://github.com/davvid/python-jsonrpc/tarball/%{pkg_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: bash
BuildRequires: coreutils
Requires: coreutils
Requires: bash
BuildRequires: %{?scl_prefix}pathfinder
Requires: %{?scl_prefix}pathfinder
%{?scl:Requires: %{scl}-runtime}
%{?scl:BuildRequires: %{scl}-build %{scl}-runtime}
%if 0%{?with_python3}
BuildRequires: python3-devel
%endif
%{?scl:Autoreq: 0}
prefix: %{_prefix}
%description
python-jsonrpc is the python implementation of the JSON-RPC remote procedure
call mechanism. It is designed to be light-weight and fast, but similar in
functionality to XML-RPC
%prep
%setup -q -n %{pkg_name}-%{version}
%build
%{?scl:scl enable %scl - << \EOF}
make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir}
%{?scl:EOF}
%install
%{?scl:scl enable %scl - << \EOF}
make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} install
%{?scl:EOF}
%clean
rm -rf %{buildroot}
%post
%postun
%files
%defattr(-,root,root,-)
%if 0%{?with_python3}
%{python3_sitearch}/jsonrpc
%else
%{python_sitearch}/jsonrpc
%endif