components/zlib/patches/destdir.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 184 037c654f48d9
permissions -rw-r--r--
Close of build 04.
--- zlib-1.2.3/Makefile.in.orig
+++ zlib-1.2.3/Makefile.in
@@ -90,23 +90,23 @@
 	$(CC) $(CFLAGS) -o [email protected] minigzip.o $(LDFLAGS)
 
 install: $(LIBS)
-	[email protected] [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
-	[email protected] [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
-	[email protected] [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
-	[email protected] [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
-	cp zlib.h zconf.h $(includedir)
-	chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-	cp $(LIBS) $(libdir)
-	cd $(libdir); chmod 755 $(LIBS)
-	[email protected](cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-	cd $(libdir); if test -f $(SHAREDLIBV); then \
+	[email protected] [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
+	[email protected] [ ! -d $(DESTDIR)$(includedir)  ]; then mkdir -p $(DESTDIR)$(includedir); fi
+	[email protected] [ ! -d $(DESTDIR)$(libdir)      ]; then mkdir -p $(DESTDIR)$(libdir); fi
+	[email protected] [ ! -d $(DESTDIR)$(man3dir)     ]; then mkdir -p $(DESTDIR)$(man3dir); fi
+	cp zlib.h zconf.h $(DESTDIR)$(includedir)
+	chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
+	cp $(LIBS) $(DESTDIR)$(libdir)
+	cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
+	[email protected](cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
+	cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
 	  rm -f $(SHAREDLIB) $(SHAREDLIBM); \
 	  ln -s $(SHAREDLIBV) $(SHAREDLIB); \
 	  ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
 	  (ldconfig || true)  >/dev/null 2>&1; \
 	fi
-	cp zlib.3 $(man3dir)
-	chmod 644 $(man3dir)/zlib.3
+	cp zlib.3 $(DESTDIR)$(man3dir)
+	chmod 644 $(DESTDIR)$(man3dir)/zlib.3
 # The ranlib in install is needed on NeXTSTEP which checks file times
 # ldconfig is for Linux