According to the README, one can install nvmetcli through setup.py.
When one tries this though, the nvmetcli isn't configured in system's
$PATH.
Adding nvmetcli to scripts argument in setup call does half of the job.
Then, in order to install it in the correct location in a maintanable
way it's introduced setup.cfg file which contains 'install_scripts'
parameter for 'install' command set to /usr/sbin.
Nothing changes on the .deb package creation, the .rpm package process
in the other hand was made simpler by lines that are now done by
setup.py + setup.cfg settings.
Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root=%{buildroot} --prefix=usr
mkdir -p %{buildroot}%{_sysconfdir}/nvmet
-mkdir -p %{buildroot}/usr/sbin
-install -m 755 nvmetcli %{buildroot}/usr/sbin/nvmetcli
mkdir -p %{buildroot}%{_unitdir}
install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service
--- /dev/null
+[install]
+install_scripts=/usr/sbin
maintainer_email = 'hch@lst.de',
test_suite='nose2.collector.collector',
packages = ['nvmet'],
+ scripts=['nvmetcli']
)