From a5283f584122bbcfb9085d46f6efe18d45440719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 17:57:28 +0200 Subject: Adding upstream version 0.8. Signed-off-by: Daniel Baumann --- rpm/nvmetcli.spec.tmpl | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 rpm/nvmetcli.spec.tmpl (limited to 'rpm/nvmetcli.spec.tmpl') diff --git a/rpm/nvmetcli.spec.tmpl b/rpm/nvmetcli.spec.tmpl new file mode 100644 index 0000000..f1b5533 --- /dev/null +++ b/rpm/nvmetcli.spec.tmpl @@ -0,0 +1,55 @@ +Name: nvmetcli +License: Apache License 2.0 +Group: Applications/System +Summary: Command line interface for the kernel NVMe nvmet +Version: VERSION +Release: 1%{?dist} +URL: http://git.infradead.org/users/hch/nvmetcli.git +Source: nvmetcli-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rpmroot +BuildArch: noarch +BuildRequires: python-devel python-setuptools systemd-units +Requires: python-configshell python-kmod python-six +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +This package contains the command line interface to the NVMe over Fabrics +nvmet in the Linux kernel. It allows configuring the nvmet interactively +as well as saving / restoring the configuration to / from a json file. + +%prep +%setup -q -n nvmetcli-%{version} + +%build +%{__python} setup.py build + +%install +rm -rf %{buildroot} +%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=usr +mkdir -p %{buildroot}%{_sysconfdir}/nvmet +mkdir -p %{buildroot}%{_unitdir} +install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service + +%clean +rm -rf %{buildroot} + +%post +%systemd_post nvmet.service + +%preun +%systemd_preun nvmet.service + +%postun +%systemd_postun_with_restart nvmet.service + +%files +%defattr(-,root,root,-) +%{python_sitelib} +%dir %{_sysconfdir}/nvmet +/usr/sbin/nvmetcli +%{_unitdir}/nvmet.service +%doc COPYING README + +%changelog -- cgit v1.2.3