Dirk Mueller
10ab83e55f
Update to version 2.1.fb64,improve ALUA and TCMU support OBS-URL: https://build.opensuse.org/request/show/518023 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=22
103 lines
3.3 KiB
RPMSpec
103 lines
3.3 KiB
RPMSpec
#
|
|
# spec file for package python-rtslib-fb
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define oname rtslib-fb
|
|
%define realver 2.1.fb64
|
|
%define dbdir /etc/target
|
|
|
|
Name: python-%{oname}
|
|
Version: 2.1.64
|
|
Release: 0%{?dist}
|
|
Url: http://github.com/open-iscsi/rtslib-fb.git
|
|
Summary: API for Linux kernel SCSI target (aka LIO)
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Source: %{oname}-%{realver}.tar.gz
|
|
Patch1: Switch-target-driver-DB-root-dir-to-etc-target.patch
|
|
Conflicts: python-rtslib
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: python-six
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Requires: pyudev
|
|
|
|
%description
|
|
rtslib-fb is an object-based Python library for configuring the LIO generic
|
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
|
the Apache 2.0 license. Contributions are welcome
|
|
|
|
%package doc
|
|
Summary: Documentatoin for Python rtslib-fb
|
|
Group: Documentation/HTML
|
|
BuildArch: noarch
|
|
BuildRequires: epydoc
|
|
BuildRequires: pyudev
|
|
|
|
%description doc
|
|
rtslib-fb is an object-based Python library for configuring the LIO generic
|
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
|
the Apache 2.0 license. Contributions are welcome
|
|
|
|
%prep
|
|
%setup -q -n %{oname}-%{realver}
|
|
#%patch1 -p1
|
|
|
|
%build
|
|
%__python setup.py build
|
|
%__mkdir_p doc/
|
|
epydoc --no-sourcecode --html -n %{oname} --exclude configobj rtslib_fb/*.py
|
|
%__mv html doc/
|
|
|
|
%install
|
|
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
|
|
%__python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
|
|
%fdupes %{buildroot}%{python_sitelib}
|
|
%__install -d -m755 %{buildroot}%{_defaultdocdir}/python-rtslib-doc-%{version}
|
|
%__cp -r doc/* %{buildroot}%{_defaultdocdir}/python-rtslib-doc-%{version}/
|
|
%fdupes %{buildroot}%{_defaultdocdir}
|
|
%__install -d -m755 %{buildroot}%{_sysconfdir}/target
|
|
%__install -d -m755 %{buildroot}%{_mandir}/man5
|
|
%__install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5
|
|
%__install -d -m755 %{buildroot}%{_mandir}/man8
|
|
%__install -m644 doc/targetctl.8 %{buildroot}%{_mandir}/man8
|
|
%__install -d -m755 %{buildroot}/%{dbdir}
|
|
%__install -d -m755 %{buildroot}/%{dbdir}/pr
|
|
%__install -d -m755 %{buildroot}/%{dbdir}/alua
|
|
|
|
%clean
|
|
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/targetctl
|
|
%{python_sitelib}/*
|
|
%doc COPYING README.md
|
|
%dir %{_sysconfdir}/target
|
|
%doc %{_mandir}/man5/saveconfig.json.5.gz
|
|
%doc %{_mandir}/man8/targetctl.8.gz
|
|
%dir %{dbdir}
|
|
%dir %{dbdir}/pr
|
|
%dir %{dbdir}/alua
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%{_defaultdocdir}/python-rtslib-doc-%{version}
|
|
|
|
%changelog
|