[Libosinfo] [PATCH osinfo-db] Add support for DESTDIR

Daniel P. Berrange berrange at redhat.com
Tue Sep 13 09:03:10 UTC 2016


The jhbuild system doesn't support plain "make" systems,
so we need to pretend to be more automake-like. Adding
DESTDIR support lets jhbuild' automake "make install"
step work.

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 Makefile     | 3 ++-
 autobuild.sh | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3cffade..53a2ea5 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ TODAY = $(shell date +"%Y%m%d")
 OSINFO_DB_EXPORT = osinfo-db-export
 OSINFO_DB_IMPORT = osinfo-db-import
 
+DESTDIR = /
 OSINFO_DB_TARGET = --user
 
 INTLTOOL_MERGE = intltool-merge
@@ -48,7 +49,7 @@ INTLTOOL_MERGE_OPTS_1 =
 all: $(ARCHIVE) osinfo-db.spec mingw-osinfo-db.spec
 
 install: $(ARCHIVE)
-	$(OSINFO_DB_IMPORT) $(OSINFO_DB_TARGET) $(ARCHIVE)
+	$(OSINFO_DB_IMPORT) --root $(DESTDIR) $(OSINFO_DB_TARGET) $(ARCHIVE)
 
 %.spec: %.spec.in Makefile
 	$(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
diff --git a/autobuild.sh b/autobuild.sh
index d3b8cf4..d82b0ef 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -22,7 +22,7 @@ case $MAKEFLAGS in
 esac
 
 make
-make install OSINFO_DB_TARGET="--system --root $AUTOBUILD_INSTALL_ROOT"
+make install DESTDIR="$AUTOBUILD_INSTALL_ROOT" OSINFO_DB_TARGET="--system"
 
 if [ -n "$AUTOBUILD_COUNTER" ]; then
   EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
-- 
2.7.4




More information about the Libosinfo mailing list