nvme-cli: fix build and handling of generated files
This commit is contained in:
parent
0d679925ca
commit
c37bb33a11
|
@ -0,0 +1,12 @@
|
|||
if [ "$UPDATE" != "yes" ]; then
|
||||
case "${ACTION}" in
|
||||
post)
|
||||
if [ ! -s etc/nvme/hostnqn ]; then
|
||||
echo $(nvme gen-hostnqn) > etc/nvme/hostnqn
|
||||
fi
|
||||
if [ ! -s etc/nvme/hostid ]; then
|
||||
uuidgen > etc/nvme/hostid
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
|
@ -0,0 +1,8 @@
|
|||
if [ "$UPDATE" != "yes" ]; then
|
||||
case "${ACTION}" in
|
||||
pre)
|
||||
rm -f etc/nvme/hostnqn
|
||||
rm -f etc/nvme/hostid
|
||||
;;
|
||||
esac
|
||||
fi
|
|
@ -1,10 +1,14 @@
|
|||
# Template file for 'nvme-cli'
|
||||
pkgname=nvme-cli
|
||||
version=1.9
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-makefile
|
||||
# yeah, it must be 0 to enable
|
||||
make_build_args="LIBUUID=0"
|
||||
make_install_args="SBINDIR=/usr/bin"
|
||||
hostmakedepends="util-linux"
|
||||
make_install_target="install-spec"
|
||||
makedepends="libuuid-devel"
|
||||
depends="util-linux"
|
||||
short_desc="NVMe management command line interface"
|
||||
maintainer="Peter Froehlich <peter.hans.froehlich@gmail.com>"
|
||||
license="GPL-2.0-only"
|
||||
|
@ -13,3 +17,10 @@ distfiles="https://github.com/linux-nvme/nvme-cli/archive/v${version}.tar.gz"
|
|||
checksum=d7c3d56f36f81c0933f7b7c3f90c4196be0fec758affc8062c525b6bc5ea65f5
|
||||
|
||||
CFLAGS="-Wno-error -I."
|
||||
|
||||
# these files are touch'd by install, remove so they don't get registered
|
||||
# by the package (which would subsequently cause trouble during removal)
|
||||
post_install() {
|
||||
rm -f "${PKGDESTDIR}/etc/nvme/hostnqn"
|
||||
rm -f "${PKGDESTDIR}/etc/nvme/hostid"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue