]> git.pld-linux.org Git - packages/python-rtslib-fb.git/blame - python-rtslib-fb.spec
- up to 2.1.fb50
[packages/python-rtslib-fb.git] / python-rtslib-fb.spec
CommitLineData
dedb394b
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module rtslib
7Summary: Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
8Name: python-rtslib-fb
bf74d903 9Version: 2.1.fb50
dedb394b
JK
10Release: 1
11License: Apache v2.0
12Group: Libraries/Python
13Source0: https://codeload.github.com/agrover/rtslib-fb/tar.gz/v%{version}
bf74d903 14# Source0-md5: 2eccddc0c6061590250f2d358fafdad7
dedb394b
JK
15URL: https://github.com/agrover/rtslib-fb
16BuildRequires: python-distribute
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.219
19BuildRequires: sed >= 4.0
20%if %{with python3}
21BuildRequires: python3-distribute
22BuildRequires: python3-modules
23%endif
24Requires: python-modules
25BuildArch: noarch
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29rtslib-fb is an object-based Python library for configuring the LIO
30generic SCSI target, present in 3.x Linux kernel versions.
31
32%package -n python3-rtslib-fb
33Summary: Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
34Group: Libraries/Python
35
36%description -n python3-rtslib-fb
37rtslib-fb is an object-based Python library for configuring the LIO
38generic SCSI target, present in 3.x Linux kernel versions.
39
40%prep
41%setup -q -n rtslib-fb-%{version}
42
43%build
44%if %{with python2}
45%{__python} setup.py build --build-base build-2 %{?with_tests:test}
46%endif
47
48%if %{with python3}
49%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
50%endif
51
52%install
53rm -rf $RPM_BUILD_ROOT
54install -d $RPM_BUILD_ROOT%{_mandir}/man{5,8}
55
56%if %{with python2}
57%{__python} setup.py \
58 build --build-base build-2 \
59 install --skip-build \
60 --root=$RPM_BUILD_ROOT \
61 --optimize=2
62
63%py_postclean
64%endif
65
66%if %{with python3}
67%{__python3} setup.py \
68 build --build-base build-3 \
69 install --skip-build \
70 --root=$RPM_BUILD_ROOT \
71 --optimize=2
72%endif
73
74cp doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5/
75cp doc/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
81%files
82%defattr(644,root,root,755)
83%attr(755,root,root) %{_bindir}/targetctl
84%doc README.md
85%dir %{py_sitescriptdir}/%{module}
86%{py_sitescriptdir}/%{module}/*.py[co]
87%if "%{py_ver}" > "2.4"
88%{py_sitescriptdir}/rtslib_fb-*.egg-info
89%endif
90%endif
91%{_mandir}/man5/saveconfig.json.5*
92%{_mandir}/man8/targetctl.8*
93
94%if %{with python3}
95%files -n python3-rtslib-fb
96%defattr(644,root,root,755)
97%doc README.md
98%{py3_sitescriptdir}/%{module}
99%{py3_sitescriptdir}/rtslib_fb-*-py*.egg-info
100%endif
This page took 0.079704 seconds and 4 git commands to generate.