2014-01-14 10:00:40 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-rtslib-fb
|
|
|
|
#
|
2017-04-13 19:32:40 +02:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-01-14 10:00:40 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2016-04-21 12:30:18 +02:00
|
|
|
%define oname rtslib-fb
|
2017-09-05 10:05:16 +02:00
|
|
|
%define realver 2.1.fb64
|
2017-07-04 17:29:24 +02:00
|
|
|
%define dbdir /etc/target
|
2016-04-21 12:30:18 +02:00
|
|
|
|
|
|
|
Name: python-%{oname}
|
2017-09-05 10:05:16 +02:00
|
|
|
Version: 2.1.64
|
2017-04-13 19:32:40 +02:00
|
|
|
Release: 0%{?dist}
|
|
|
|
Url: http://github.com/open-iscsi/rtslib-fb.git
|
2014-01-14 10:00:40 +01:00
|
|
|
Summary: API for Linux kernel SCSI target (aka LIO)
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2017-09-05 10:05:16 +02:00
|
|
|
Source: %{oname}-%{realver}.tar.gz
|
2016-06-25 01:33:50 +02:00
|
|
|
Conflicts: python-rtslib
|
2016-04-21 12:30:18 +02:00
|
|
|
BuildRequires: fdupes
|
2014-01-14 10:00:40 +01:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-setuptools
|
2017-04-13 19:32:40 +02:00
|
|
|
BuildRequires: python-six
|
2014-01-14 10:00:40 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2016-05-11 22:05:22 +02:00
|
|
|
Requires: pyudev
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%description
|
2017-11-28 09:56:02 +01:00
|
|
|
rtslib-fb is an object-based Python library for configuring the LIO generic
|
2014-01-14 10:00:40 +01:00
|
|
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
|
|
|
the Apache 2.0 license. Contributions are welcome
|
|
|
|
|
2016-04-21 12:30:18 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentatoin for Python rtslib-fb
|
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: epydoc
|
|
|
|
BuildRequires: pyudev
|
|
|
|
|
|
|
|
%description doc
|
2017-11-28 09:56:02 +01:00
|
|
|
rtslib-fb is an object-based Python library for configuring the LIO generic
|
2016-04-21 12:30:18 +02:00
|
|
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
|
|
|
the Apache 2.0 license. Contributions are welcome
|
|
|
|
|
2014-01-14 10:00:40 +01:00
|
|
|
%prep
|
2016-04-21 12:30:18 +02:00
|
|
|
%setup -q -n %{oname}-%{realver}
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%build
|
2016-04-21 12:30:18 +02:00
|
|
|
%__python setup.py build
|
|
|
|
%__mkdir_p doc/
|
|
|
|
epydoc --no-sourcecode --html -n %{oname} --exclude configobj rtslib_fb/*.py
|
|
|
|
%__mv html doc/
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%install
|
2016-04-21 12:30:18 +02:00
|
|
|
[ "%{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
|
2017-07-04 17:29:24 +02:00
|
|
|
%__install -d -m755 %{buildroot}/%{dbdir}
|
|
|
|
%__install -d -m755 %{buildroot}/%{dbdir}/pr
|
|
|
|
%__install -d -m755 %{buildroot}/%{dbdir}/alua
|
2016-04-21 12:30:18 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2016-04-21 12:30:18 +02:00
|
|
|
%{_bindir}/targetctl
|
2014-01-14 10:00:40 +01:00
|
|
|
%{python_sitelib}/*
|
2016-04-21 12:30:18 +02:00
|
|
|
%doc COPYING README.md
|
|
|
|
%dir %{_sysconfdir}/target
|
|
|
|
%doc %{_mandir}/man5/saveconfig.json.5.gz
|
|
|
|
%doc %{_mandir}/man8/targetctl.8.gz
|
2017-07-04 17:29:24 +02:00
|
|
|
%dir %{dbdir}
|
|
|
|
%dir %{dbdir}/pr
|
|
|
|
%dir %{dbdir}/alua
|
2016-04-21 12:30:18 +02:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_defaultdocdir}/python-rtslib-doc-%{version}
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%changelog
|