]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
rpmbuild: install directories using Makefile's variables
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Mon, 28 Sep 2020 08:23:22 +0000 (17:23 +0900)
committerKeith Busch <kbusch@kernel.org>
Tue, 13 Oct 2020 18:06:21 +0000 (12:06 -0600)
rpmbuild cause error on the system which is using difference RPM macros

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Makefile

index 65afdbe02a49eda3382c8b4cf1978ff7c35a3f28..c6e1e27408261c3033ef10c272b3d2abea82b62b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -231,7 +231,10 @@ deb-light: $(NVME) pkg nvme.control.in
        dpkg-deb --build nvme-$(NVME_VERSION)
 
 rpm: dist
-       $(RPMBUILD) --define '_libdir ${LIBDIR}' -ta nvme-$(NVME_VERSION).tar.gz
+       $(RPMBUILD) --define '_prefix $(DESTDIR)$(PREFIX)' \
+       --define '_libdir $(DESTDIR)${LIBDIR}' \
+       --define '_sysconfdir $(DESTDIR)$(SYSCONFDIR)' \
+       -ta nvme-$(NVME_VERSION).tar.gz
 
 .PHONY: default doc all clean clobber install-man install-bin install
 .PHONY: dist pkg dist-orig deb deb-light rpm FORCE test