summaryrefslogtreecommitdiffstats
path: root/rpm/nvmetcli.spec.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 15:57:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 15:57:28 +0000
commita5283f584122bbcfb9085d46f6efe18d45440719 (patch)
tree6f516f7d908a9852650b2f48f50818e0c1a3b3e0 /rpm/nvmetcli.spec.tmpl
parentInitial commit. (diff)
downloadnvmetcli-upstream/0.8.tar.xz
nvmetcli-upstream/0.8.zip
Adding upstream version 0.8.upstream/0.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'rpm/nvmetcli.spec.tmpl')
-rw-r--r--rpm/nvmetcli.spec.tmpl55
1 files changed, 55 insertions, 0 deletions
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