From dd36504befbb1e7b8657a4ab6d4f69cf794dca6b46a091e761e0c40688bc3dba Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 9 Jan 2024 21:43:29 +0000 Subject: [PATCH] - Clean up the SPEC file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=73 --- python-rtslib-fb.changes | 5 +++++ python-rtslib-fb.spec | 34 ++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/python-rtslib-fb.changes b/python-rtslib-fb.changes index 2290252..566a5b6 100644 --- a/python-rtslib-fb.changes +++ b/python-rtslib-fb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 9 21:43:21 UTC 2024 - Matej Cepl + +- Clean up the SPEC file + ------------------------------------------------------------------- Tue Jan 9 11:49:34 UTC 2024 - David Disseldorp diff --git a/python-rtslib-fb.spec b/python-rtslib-fb.spec index cc54cdc..151d1a7 100644 --- a/python-rtslib-fb.spec +++ b/python-rtslib-fb.spec @@ -16,14 +16,14 @@ # +%define dbdir %{_sysconfdir}/target +%define oldpython python +%define cpkg %{oldpython}-rtslib-fb-common %if 0%{?suse_version} > 1500 %bcond_without libalternatives %else %bcond_with libalternatives %endif - -%define dbdir %{_sysconfdir}/target -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?sle15_python_module_pythons} Name: python-rtslib-fb Version: 2.1.76 @@ -35,26 +35,26 @@ URL: https://github.com/open-iscsi/rtslib-fb.git Source: python-rtslib-fb-v%{version}.tar.xz Patch2: rtslib-Fix-handling-of-sysfs-RW-attrs-that-are-actually-RO.patch Patch3: rtslib-target-service-for-suse.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module pyudev} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 -Requires: python-pyudev -%define oldpython python -%define cpkg %{oldpython}-rtslib-fb-common Requires: %{cpkg} +Requires: python-pyudev +Requires: python-six +Provides: python-rtslib = %{version}-%{release} +Obsoletes: python-rtslib < %{version} +BuildArch: noarch %if %{with libalternatives} -Requires: alts BuildRequires: alts +Requires: alts %else Requires(post): update-alternatives Requires(postun):update-alternatives %endif -Provides: python-rtslib = %{version}-%{release} -Obsoletes: python-rtslib < %{version} -BuildArch: noarch - %python_subpackages %description @@ -77,10 +77,10 @@ python2-rtslib-fb and python3-rtslib-fb. %patch3 -p1 %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}/%{_bindir}/targetctl %fdupes %{buildroot} install -d -m755 %{buildroot}%{_mandir}/man5 @@ -126,7 +126,9 @@ ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctarget %files %{python_files} %python_alternative %{_bindir}/targetctl -%{python_sitelib}/* +%{python_sitelib}/rtslib +%{python_sitelib}/rtslib_fb +%{python_sitelib}/rtslib_fb-%{version}*-info %files -n %{cpkg} %license COPYING @@ -136,7 +138,7 @@ ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctarget %dir %{dbdir}/alua %{_unitdir}/target.service %{_sbindir}/rctarget -%doc %{_mandir}/man5/saveconfig.json.5.gz -%doc %{_mandir}/man8/targetctl.8.gz +%{_mandir}/man5/saveconfig.json.5%{?ext_man} +%{_mandir}/man8/targetctl.8%{?ext_man} %changelog