commit 5217a348cd4ec0aafb782551302de44c276672c2 Author: byeX012 Date: Mon Dec 2 21:15:50 2019 +0800 package init diff --git a/nvmetcli-0.4.tar.gz b/nvmetcli-0.4.tar.gz new file mode 100644 index 0000000..819d7fb Binary files /dev/null and b/nvmetcli-0.4.tar.gz differ diff --git a/nvmetcli.spec b/nvmetcli.spec new file mode 100644 index 0000000..25e329e --- /dev/null +++ b/nvmetcli.spec @@ -0,0 +1,71 @@ +Name: nvmetcli +Version: 0.4 +Release: 6 +Summary: A command line interface for the kernel NVMe nvmet +License: ASL 2.0 +URL: ftp://ftp.infradead.org/pub/nvmetcli/ +Source: ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python3-devel python3-setuptools systemd-units asciidoc xmlto + +Requires: python3-configshell python3-kmod +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +nvmetcli is a program used for viewing, editing, saving, +and starting a Linux kernel NVMe Target, used for an NVMe-over-Fabrics +network configuration. It allows an administrator to export +a storage resource (such as NVMe devices, files, and volumes) +to a local block device and expose them to remote systems +based on the NVMe-over-Fabrics specification from http://www.nvmexpress.org. + +%package help +Summary: Documents for nvmetcli + +BuildArch: noarch + +%description help +The nvmetcli-help package contains related documents. + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +%{__python3} setup.py build +cd Documentation +make +gzip --stdout nvmetcli.8 > nvmetcli.8.gz + +%install +%{__python3} setup.py install --skip-build --root %{buildroot} + +install -d %{buildroot}%{_sysconfdir}/nvmet +install -m 644 -D nvmet.service %{buildroot}%{_unitdir}/nvmet.service +install -m 644 -D Documentation/nvmetcli.8.gz %{buildroot}%{_mandir}/man8/nvmetcli.8.gz + +%post +%systemd_post nvmet.service + +%preun +%systemd_preun nvmet.service + +%postun +%systemd_postun_with_restart nvmet.service + +%files +%doc COPYING +%{python3_sitelib}/* +%dir %{_sysconfdir}/nvmet +%{_sbindir}/nvmetcli +%{_unitdir}/nvmet.service + +%files help +%doc README +%{_mandir}/man8/nvmetcli.8.gz + +%changelog +* Sat Nov 30 2019 Jiangping Hu - 0.4-6 +- Package init