2016-02-11 14:11:43 +01:00
|
|
|
#
|
2016-02-19 10:15:02 +01:00
|
|
|
# spec file for package nvme-cli
|
2016-02-11 14:11:43 +01:00
|
|
|
#
|
2018-01-10 11:31:09 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-02-11 14:11:43 +01: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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: nvme-cli
|
2018-01-10 11:31:09 +01:00
|
|
|
Version: 1.5
|
2016-02-11 14:11:43 +01:00
|
|
|
Release: 0
|
2017-10-24 15:04:20 +02:00
|
|
|
Summary: NVM Express user space tools
|
2016-02-11 14:11:43 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Hardware/Other
|
|
|
|
Url: https://github.com/linux-nvme/nvme-cli
|
2017-03-07 16:37:10 +01:00
|
|
|
Source: %{name}-v%{version}.tar.gz
|
2017-06-16 12:21:29 +02:00
|
|
|
BuildRequires: asciidoc
|
2017-06-26 12:05:38 +02:00
|
|
|
BuildRequires: libuuid-devel
|
2017-06-16 12:21:29 +02:00
|
|
|
BuildRequires: xmlto
|
2016-02-19 10:15:02 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
2016-02-11 14:11:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2018-02-13 14:28:50 +01:00
|
|
|
Patch1: 0001-nvme-cli-add-NetApp-plugin.patch
|
|
|
|
Patch2: 0002-nvme-cli-add-netapp-smdevices-man-page.patch
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%description
|
2017-10-24 15:04:20 +02:00
|
|
|
NVM Express (NVMe) is a direct attached storage interface. The
|
|
|
|
nvme-cli package contains core management tools with minimal
|
|
|
|
dependencies.
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%prep
|
2017-03-07 16:37:10 +01:00
|
|
|
%setup -q -n %{name}-v%{version}
|
2018-02-13 14:28:50 +01:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%build
|
2016-02-19 10:15:02 +01:00
|
|
|
echo %{version} > version
|
2017-06-16 12:21:29 +02:00
|
|
|
make CFLAGS="%{optflags}" PREFIX=%{_prefix} %{?_smp_mflags} all
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make PREFIX=%{_prefix} DESTDIR=%{buildroot} install-bin install-man %{?_smp_mflags}
|
2017-06-26 13:00:04 +02:00
|
|
|
install -m 644 -D /dev/null %{buildroot}%{_sysconfdir}/nvme/hostnqn
|
2016-02-19 10:15:02 +01:00
|
|
|
install -m 644 -D completions/bash-nvme-completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/nvme
|
2016-02-11 14:11:43 +01:00
|
|
|
|
2017-06-26 10:36:13 +02:00
|
|
|
%post
|
2017-06-26 13:13:01 +02:00
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostnqn ]; then
|
|
|
|
%{_sbindir}/nvme gen-hostnqn > %{_sysconfdir}/nvme/hostnqn
|
2017-06-26 10:36:13 +02:00
|
|
|
fi
|
2017-06-30 15:43:19 +02:00
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostid ]; then
|
|
|
|
%{_bindir}/uuidgen > %{_sysconfdir}/nvme/hostid
|
|
|
|
fi
|
2017-06-26 10:36:13 +02:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_sbindir}/nvme
|
|
|
|
%{_mandir}/man1/nvme*.1*
|
2016-02-19 10:15:02 +01:00
|
|
|
%dir %{_sysconfdir}/bash_completion.d/
|
|
|
|
%{_sysconfdir}/bash_completion.d/nvme
|
2017-06-26 13:13:01 +02:00
|
|
|
%dir %{_sysconfdir}/nvme/
|
|
|
|
%ghost %{_sysconfdir}/nvme/hostnqn
|
2017-06-30 15:43:19 +02:00
|
|
|
%ghost %{_sysconfdir}/nvme/hostid
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%changelog
|