diff --git a/libnvme.spec b/libnvme.spec index 97a846d..cb1894d 100644 --- a/libnvme.spec +++ b/libnvme.spec @@ -1,10 +1,14 @@ # RHEL 8 compatibility %{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}} +%if 0%{?rhel} == 9 +%bcond_with doc +%endif + Name: libnvme Summary: Linux-native nvme device management library Version: 1.8 -Release: 1%{?dist} +Release: 1.1%{?dist} License: LGPL-2.1-or-later URL: https://github.com/linux-nvme/libnvme Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz @@ -35,6 +39,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package provides header files to include and libraries to link with for Linux-native nvme device management. + +%if %{with doc} %package doc Summary: Reference manual for libnvme BuildArch: noarch @@ -44,6 +50,7 @@ BuildRequires: python3-sphinx_rtd_theme %description doc This package contains the reference manual for %{name}. +%endif %package -n python3-libnvme Summary: Python3 bindings for libnvme @@ -59,16 +66,22 @@ This package contains Python bindings for libnvme. %autosetup -p1 -n %{name}-%{version_no_tilde} %build +%if %{with doc} %meson -Dpython=enabled -Dlibdbus=enabled -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir} +%else +%meson -Dpython=enabled -Dlibdbus=enabled -Ddocs-build=false +%endif %meson_build %install %meson_install +%if %{with doc} %{__install} -pm 644 README.md %{buildroot}%{_pkgdocdir} %{__install} -pm 644 doc/config-schema.json %{buildroot}%{_pkgdocdir} mv %{buildroot}%{_pkgdocdir}/nvme/html %{buildroot}%{_pkgdocdir}/html rm -rf %{buildroot}%{_pkgdocdir}/nvme mv %{buildroot}/usr/*.rst %{buildroot}%{_pkgdocdir}/ +%endif %ldconfig_scriptlets @@ -88,15 +101,20 @@ mv %{buildroot}/usr/*.rst %{buildroot}%{_pkgdocdir}/ %{_includedir}/nvme/*.h %{_libdir}/pkgconfig/*.pc +%if %{with doc} %files doc %doc %{_pkgdocdir} %{_mandir}/man2/*.2* +%endif %files -n python3-libnvme %dir %{python3_sitearch}/libnvme %{python3_sitearch}/libnvme/* %changelog +* Thu Feb 22 2024 Michel Lind - 1.8-1.1 +- Disable HTML building on EL9, the output differs based on host architecture + * Wed Feb 14 2024 Tomas Bzatek - 1.8-1 - Upstream v1.8 release