File camlp4.DESTDIR.patch of Package ocaml-camlp4.1126

---
 Makefile         |    8 +++++---
 build/install.sh |    4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

Index: camlp4-4.02.1-1/Makefile
===================================================================
--- camlp4-4.02.1-1.orig/Makefile
+++ camlp4-4.02.1-1/Makefile
@@ -1,4 +1,6 @@
 OB := ocamlbuild -classic-display -no-ocamlfind
+DESTDIR=
+
 -include config.sh
 
 OB += $(OB_FLAGS)
@@ -19,12 +21,12 @@ all: byte native
 
 .PHONY: install
 install:
-	./build/install.sh
+	DESTDIR=$(DESTDIR) ./build/install.sh
 
 .PHONY: install-META
 install-META: camlp4/META
-	mkdir -p ${PKGDIR}/camlp4/
-	cp -f camlp4/META ${PKGDIR}/camlp4/
+	mkdir -p $(DESTDIR)${PKGDIR}/camlp4/
+	cp -f camlp4/META $(DESTDIR)${PKGDIR}/camlp4/
 
 camlp4/META: camlp4/META.in
 	sed -e s/@@VERSION@@/${version}/g $? > $@
Index: camlp4-4.02.1-1/build/install.sh
===================================================================
--- camlp4-4.02.1-1.orig/build/install.sh
+++ camlp4-4.02.1-1/build/install.sh
@@ -26,8 +26,8 @@ SAVED_LIBDIR="${LIBDIR}"
 
 . ./config.sh
 
-BINDIR="${SAVED_BINDIR:-${BINDIR}}"
-LIBDIR="${SAVED_LIBDIR:-${LIBDIR}}"
+BINDIR="$DESTDIR${SAVED_BINDIR:-${BINDIR}}"
+LIBDIR="$DESTDIR${SAVED_LIBDIR:-${LIBDIR}}"
 
 not_installed=$PWD/_build/not_installed
openSUSE Build Service is sponsored by