2016-04-26 16:17:33 +02:00
|
|
|
#
|
|
|
|
# spec file for package targetcli-fb
|
|
|
|
#
|
2018-01-09 23:18:46 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-04-26 16:17:33 +02: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-07-27 22:47:33 +02:00
|
|
|
|
2016-04-26 16:17:33 +02:00
|
|
|
%define oname targetcli-fb
|
2017-08-22 19:43:11 +02:00
|
|
|
%define realver 2.1.fb47
|
2018-01-09 23:18:46 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2016-07-27 22:47:33 +02:00
|
|
|
Name: %{oname}
|
2017-08-22 19:43:11 +02:00
|
|
|
Version: 2.1.47
|
2016-11-02 00:17:15 +01:00
|
|
|
Release: 0
|
2016-07-27 22:47:33 +02:00
|
|
|
Summary: A command shell for managing the Linux LIO kernel target
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
2018-01-09 23:18:46 +01:00
|
|
|
Url: http://github.com/agrover/%{oname}
|
|
|
|
Source: %{oname}-%{realver}.tar.xz
|
2016-07-27 22:47:33 +02:00
|
|
|
Source1: %{oname}.service
|
2018-01-09 23:18:46 +01:00
|
|
|
BuildRequires: %{python_module configshell-fb}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module pyparsing}
|
|
|
|
BuildRequires: %{python_module rtslib-fb}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: systemd
|
2016-07-27 22:47:33 +02:00
|
|
|
Requires: python-configshell-fb
|
2018-01-09 23:18:46 +01:00
|
|
|
Requires: python-dbus-python
|
2016-07-27 22:47:33 +02:00
|
|
|
Requires: python-rtslib-fb
|
|
|
|
Requires: python-six
|
2018-01-09 23:18:46 +01:00
|
|
|
Requires: targetcli-fb-common
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%ifpython3
|
2018-02-05 18:22:42 +01:00
|
|
|
Provides: targetcli-fb = %{version}-%{release}
|
2018-02-25 21:08:25 +01:00
|
|
|
Provides: targetcli = %{version}-%{release}
|
2018-01-09 23:18:46 +01:00
|
|
|
%endif
|
2018-02-25 21:08:25 +01:00
|
|
|
Obsoletes: targetcli-fb
|
|
|
|
Obsoletes: targetcli
|
2016-07-27 22:47:33 +02:00
|
|
|
BuildArch: noarch
|
2016-04-26 16:17:33 +02:00
|
|
|
%{?systemd_requires}
|
2018-01-09 23:18:46 +01:00
|
|
|
|
|
|
|
%python_subpackages
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
targetcli-fb is a command-line interface for configuring the LIO generic
|
|
|
|
SCSI target, present in 3.x Linux kernel versions.
|
|
|
|
|
|
|
|
targetcli-fb is a fork of the "targetcli" code written by RisingTide Systems.
|
|
|
|
The "-fb" differentiates between the original and this version. Please ensure
|
|
|
|
to use either all "fb" versions of the targetcli components -- targetcli,
|
|
|
|
rtslib, and configshell, or stick with all non-fb versions, since they are
|
|
|
|
no longer strictly compatible.
|
|
|
|
|
2018-01-09 23:18:46 +01:00
|
|
|
%package -n %{name}-common
|
|
|
|
Summary: Common targetcli-fb subpackage for either flavor of Python
|
|
|
|
Group: System/Management
|
|
|
|
Provides: %{python_module targetcli-fb-common}
|
|
|
|
|
|
|
|
%description -n %{name}-common
|
|
|
|
targetcli-fb-common is the invariant base package needed by both
|
|
|
|
python2-targetcli-fb and python3-targetcli-fb.
|
|
|
|
|
2016-04-26 16:17:33 +02:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{oname}-%{realver}%{?extraver}
|
|
|
|
|
|
|
|
%build
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_build
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%install
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/targetcli
|
2016-11-02 00:17:15 +01:00
|
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/target
|
|
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/target/backup
|
|
|
|
install -d -m755 %{buildroot}%{_sbindir}
|
|
|
|
install -D -m644 targetcli.8 %{buildroot}%{_mandir}/man8/targetcli.8
|
2018-01-09 23:18:46 +01:00
|
|
|
install -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/targetcli.service
|
|
|
|
%fdupes %{buildroot}
|
2016-11-02 00:17:15 +01:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctargetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%post
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_install_alternative targetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%postun
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_uninstall_alternative targetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%{service_add_pre targetcli.service}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%{stop_on_removal targetcli}
|
2018-01-09 23:18:46 +01:00
|
|
|
|
|
|
|
%post -n %{name}-common
|
|
|
|
%{service_add_post targetcli.service}
|
|
|
|
|
|
|
|
%postun -n %{name}-common
|
|
|
|
%{service_del_postun targetcli.service}
|
|
|
|
|
|
|
|
%pre -n %{name}-common
|
|
|
|
%{service_add_pre targetcli.service}
|
|
|
|
|
|
|
|
%preun -n %{name}-common
|
2016-04-26 16:17:33 +02:00
|
|
|
%{service_del_preun targetcli.service}
|
|
|
|
|
2018-01-09 23:18:46 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%python_alternative %{_bindir}/targetcli
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%files -n %{name}-common
|
2016-04-26 16:17:33 +02:00
|
|
|
%doc COPYING README.md THANKS
|
|
|
|
%dir %{_sysconfdir}/target
|
|
|
|
%dir %{_sysconfdir}/target/backup
|
2018-01-09 23:18:46 +01:00
|
|
|
%doc %{_mandir}/man8/targetcli.8%{ext_man}
|
2016-04-26 16:17:33 +02:00
|
|
|
%{_unitdir}/targetcli.service
|
|
|
|
%{_sbindir}/rctargetcli
|
|
|
|
|
|
|
|
%changelog
|