Use proper naming macros for sushy-tools
Change-Id: I913dfdfaab0f29316cc3351b1e72b13f98796b56
This commit is contained in:
@@ -34,14 +34,14 @@ Requires(preun): systemd
|
|||||||
%description
|
%description
|
||||||
A set of tools to support the development and test of the Sushy library
|
A set of tools to support the development and test of the Sushy library
|
||||||
|
|
||||||
%package -n python3-{{ py2name() }}
|
%package -n {{ py2name(py_versions='py3') }}
|
||||||
Summary: A set of tools to support the development and test of the Sushy library
|
Summary: A set of tools to support the development and test of the Sushy library
|
||||||
Requires: {{ py3('Flask') }}
|
Requires: {{ py3('Flask') }}
|
||||||
Requires: {{ py3('pbr') }}
|
Requires: {{ py3('pbr') }}
|
||||||
Requires: {{ py3('requests') }}
|
Requires: {{ py3('requests') }}
|
||||||
Requires: {{ py3('tenacity') }}
|
Requires: {{ py3('tenacity') }}
|
||||||
|
|
||||||
%description -n python3-{{ py2name() }}
|
%description -n {{ py2name(py_versions='py3') }}
|
||||||
A set of tools to support the development and test of the Sushy library
|
A set of tools to support the development and test of the Sushy library
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
%if 0%{?with_doc}
|
||||||
@@ -51,7 +51,7 @@ BuildRequires: {{ py3('Sphinx') }}
|
|||||||
BuildRequires: {{ py3('openstackdocstheme') }}
|
BuildRequires: {{ py3('openstackdocstheme') }}
|
||||||
BuildRequires: {{ py3('sphinxcontrib-apidoc') }}
|
BuildRequires: {{ py3('sphinxcontrib-apidoc') }}
|
||||||
|
|
||||||
%description -n python3-{{ py2name() }}-doc
|
%description -n {{ py2name() }}-doc
|
||||||
Summary: sushy-tools documentation
|
Summary: sushy-tools documentation
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ mkdir -p %{buildroot}%{_sbindir}
|
|||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-{{ py2name() }}
|
%files -n {{ py2name(py_versions='py3') }}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/sushy-emulator
|
%{_bindir}/sushy-emulator
|
||||||
%{_bindir}/sushy-static
|
%{_bindir}/sushy-static
|
||||||
@@ -101,24 +101,24 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
|||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%pre -n python3-{{ py2name() }}
|
%pre -n {{ py2name(py_versions='py3') }}
|
||||||
getent group sushy-tools >/dev/null || groupadd -r sushy-tools
|
getent group sushy-tools >/dev/null || groupadd -r sushy-tools
|
||||||
getent passwd sushy-tools >/dev/null || useradd -r \
|
getent passwd sushy-tools >/dev/null || useradd -r \
|
||||||
-g sushy-tools -M -s /sbin/nologin -c "Redfish Emulator" sushy-tools
|
-g sushy-tools -M -s /sbin/nologin -c "Redfish Emulator" sushy-tools
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
%if 0%{?with_doc}
|
||||||
%files -n python-{{ py2name() }}-doc
|
%files -n {{ py2name() }}-doc
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc doc/build/html README.rst
|
%doc doc/build/html README.rst
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n python3-{{ py2name() }}
|
%post -n {{ py2name(py_versions='py3') }}
|
||||||
%systemd_post sushy-emulator.service
|
%systemd_post sushy-emulator.service
|
||||||
|
|
||||||
%preun -n python3-{{ py2name() }}
|
%preun -n {{ py2name(py_versions='py3') }}
|
||||||
%systemd_preun sushy-emulator.service
|
%systemd_preun sushy-emulator.service
|
||||||
|
|
||||||
%postun -n python3-{{ py2name() }}
|
%postun -n {{ py2name(py_versions='py3') }}
|
||||||
%systemd_postun_with_restart sushy-emulator.service
|
%systemd_postun_with_restart sushy-emulator.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user