]> git.pld-linux.org Git - packages/python-rtslib-fb.git/commitdiff
new package
authorJacek Konieczny <jajcus@jajcus.net>
Sat, 4 Jan 2014 20:09:20 +0000 (21:09 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Sat, 4 Jan 2014 20:09:20 +0000 (21:09 +0100)
python-rtslib-fb.spec [new file with mode: 0644]

diff --git a/python-rtslib-fb.spec b/python-rtslib-fb.spec
new file mode 100644 (file)
index 0000000..d73e9b6
--- /dev/null
@@ -0,0 +1,100 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module rtslib
+Summary:       Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
+Name:          python-rtslib-fb
+Version:       2.1.fb44
+Release:       1
+License:       Apache v2.0
+Group:         Libraries/Python
+Source0:       https://codeload.github.com/agrover/rtslib-fb/tar.gz/v%{version}
+# Source0-md5: aa709051e1de17fa1cff41432e05bcca
+URL:           https://github.com/agrover/rtslib-fb
+BuildRequires: python-distribute
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: sed >= 4.0
+%if %{with python3}
+BuildRequires: python3-distribute
+BuildRequires: python3-modules
+%endif
+Requires:      python-modules
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+rtslib-fb is an object-based Python library for configuring the LIO
+generic SCSI target, present in 3.x Linux kernel versions.
+
+%package -n python3-rtslib-fb
+Summary:       Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
+Group:         Libraries/Python
+
+%description -n python3-rtslib-fb
+rtslib-fb is an object-based Python library for configuring the LIO
+generic SCSI target, present in 3.x Linux kernel versions.
+
+%prep
+%setup -q -n rtslib-fb-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_mandir}/man{5,8}
+
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+%endif
+
+cp doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5/
+cp doc/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/targetctl
+%doc README.md
+%dir %{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}/*.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/rtslib_fb-*.egg-info
+%endif
+%endif
+%{_mandir}/man5/saveconfig.json.5*
+%{_mandir}/man8/targetctl.8*
+
+%if %{with python3}
+%files -n python3-rtslib-fb
+%defattr(644,root,root,755)
+%doc README.md
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/rtslib_fb-*-py*.egg-info
+%endif
This page took 0.089364 seconds and 4 git commands to generate.