Blame libnvme.spec

Tomas Bzatek 7b2638
# RHEL 8 compatibility
Tomas Bzatek 7b2638
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
Name:    libnvme
Tomas Bzatek 7b2638
Summary: Linux-native nvme device management library
Tomas Bzatek 7b2638
Version: 1.0~rc4
Tomas Bzatek 7b2638
Release: 1%{?dist}
Tomas Bzatek 7b2638
License: LGPLv2+
Tomas Bzatek 7b2638
URL:     https://github.com/linux-nvme/libnvme
Tomas Bzatek 7b2638
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
# https://github.com/linux-nvme/libnvme/pull/261
Tomas Bzatek 7b2638
Patch1:  libnvme-1.0-rc5-ccan_headers.patch
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
BuildRequires: gcc gcc-c++
Tomas Bzatek 7b2638
BuildRequires: swig
Tomas Bzatek 7b2638
BuildRequires: python3-devel
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
BuildRequires: meson >= 0.47.0
Tomas Bzatek 7b2638
BuildRequires: libuuid-devel
Tomas Bzatek 7b2638
BuildRequires: json-c-devel >= 0.13
Tomas Bzatek 7b2638
BuildRequires: openssl-devel
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%description
Tomas Bzatek 7b2638
Provides type definitions for NVMe specification structures,
Tomas Bzatek 7b2638
enumerations, and bit fields, helper functions to construct,
Tomas Bzatek 7b2638
dispatch, and decode commands and payloads, and utilities to connect,
Tomas Bzatek 7b2638
scan, and manage nvme devices on a Linux system.
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%package devel
Tomas Bzatek 7b2638
Summary: Development files for %{name}
Tomas Bzatek 7b2638
Requires: %{name}%{?_isa} = %{version}-%{release}
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%description devel
Tomas Bzatek 7b2638
This package provides header files to include and libraries to link with
Tomas Bzatek 7b2638
for Linux-native nvme device management.
Tomas Bzatek 7b2638
%package doc
Tomas Bzatek 7b2638
Summary: Reference manual for libnvme
Tomas Bzatek 7b2638
BuildArch: noarch
Tomas Bzatek 7b2638
BuildRequires: perl-interpreter
Tomas Bzatek 7b2638
BuildRequires: python3-sphinx
Tomas Bzatek 7b2638
BuildRequires: python3-sphinx_rtd_theme
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%description doc
Tomas Bzatek 7b2638
This package contains the reference manual for %{name}.
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%package -n python3-nvme
Tomas Bzatek 7b2638
Summary:  Python3 bindings for libnvme
Tomas Bzatek 7b2638
Requires: %{name}%{?_isa} = %{version}-%{release}
Tomas Bzatek 7b2638
%{?python_provide:%python_provide python3-nvme}
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%description -n python3-nvme
Tomas Bzatek 7b2638
This package contains Python bindings for libnvme.
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%prep
Tomas Bzatek 7b2638
%autosetup -p1 -n %{name}-%{version_no_tilde}
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%build
Tomas Bzatek 7b2638
%meson -Dpython=true -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
Tomas Bzatek 7b2638
%meson_build
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%install
Tomas Bzatek 7b2638
%meson_install
Tomas Bzatek 7b2638
%{__install} -pm 644 README.md %{buildroot}%{_pkgdocdir}
Tomas Bzatek 7b2638
%{__install} -pm 644 doc/config-schema.json %{buildroot}%{_pkgdocdir}
Tomas Bzatek 7b2638
mv %{buildroot}%{_pkgdocdir}/nvme/html %{buildroot}%{_pkgdocdir}/html
Tomas Bzatek 7b2638
rm -rf %{buildroot}%{_pkgdocdir}/nvme
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%ldconfig_scriptlets
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%files
Tomas Bzatek 7b2638
%license COPYING ccan/licenses/*
Tomas Bzatek 7b2638
%{_libdir}/libnvme.so.1
Tomas Bzatek 7b2638
%{_libdir}/libnvme.so.1.0.0
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%files devel
Tomas Bzatek 7b2638
%{_libdir}/libnvme.so
Tomas Bzatek 7b2638
%{_includedir}/libnvme.h
Tomas Bzatek 7b2638
%dir %{_includedir}/nvme
Tomas Bzatek 7b2638
%{_includedir}/nvme/*.h
Tomas Bzatek 7b2638
%{_libdir}/pkgconfig/*.pc
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%files doc
Tomas Bzatek 7b2638
%doc %{_pkgdocdir}
Tomas Bzatek 7b2638
%{_mandir}/man2/*.2*
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%files -n python3-nvme
Tomas Bzatek 7b2638
%dir %{python3_sitearch}/libnvme
Tomas Bzatek 7b2638
%{python3_sitearch}/libnvme/*
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
%changelog
Tomas Bzatek 7b2638
* Mon Feb 28 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc4-1
Tomas Bzatek 7b2638
- Upstream v1.0 Release Candidate 4
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
* Fri Feb 11 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc3-1
Tomas Bzatek 7b2638
- Upstream v1.0 Release Candidate 3
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
* Tue Feb 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc2-1
Tomas Bzatek 7b2638
- Upstream v1.0 Release Candidate 2
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
* Thu Jan 27 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc1-1
Tomas Bzatek 7b2638
- Upstream v1.0 Release Candidate 1
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
* Mon Jan 17 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc0-1
Tomas Bzatek 7b2638
- Upstream v1.0 Release Candidate 0
Tomas Bzatek 7b2638
Tomas Bzatek 7b2638
* Wed Oct 20 2021 Tomas Bzatek <tbzatek@redhat.com> - 0.0.1-1.git1fe38d6
Tomas Bzatek 7b2638
- Initial packaging