source: patches/zlib-1.2.3-DESTDIR-2.patch@ 986e525d

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 986e525d was 034d620, checked in by Jim Gifford <clfs@…>, 18 years ago

Added: zlib-1.2.3-DESTDIR-2.patch

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[034d620]1Submitted By: Jim Gifford <jim@linuxfromscratch.org>
2Date: 2006-12-02
3Initial Package Version: 1.2.3
4Origin: Jim Gifford
5Upstream Status: Not submitted
6Description: Adds DESTDIR Support
7
8diff -Naur zlib-1.2.3.orig/Makefile.in zlib-1.2.3/Makefile.in
9--- zlib-1.2.3.orig/Makefile.in 2006-12-02 18:05:45.000000000 -0800
10+++ zlib-1.2.3/Makefile.in 2006-12-02 18:05:34.000000000 -0800
11@@ -39,6 +39,8 @@
12 SHELL=/bin/sh
13 EXE=
14
15+DESTDIR =
16+
17 prefix = /usr/local
18 exec_prefix = ${prefix}
19 libdir = ${exec_prefix}/lib
20@@ -95,27 +97,27 @@
21 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
22
23 install-libs: $(LIBS)
24- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
25- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
26- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
27- cp $(LIBS) $(libdir)
28- cd $(libdir); chmod 755 $(LIBS)
29- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
30- cd $(libdir); if test -f $(SHAREDLIBV); then \
31+ -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
32+ -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
33+ -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
34+ cp $(LIBS) $(DESTDIR)$(libdir)
35+ cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
36+ -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
37+ cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
38 rm -f $(SHAREDLIB) $(SHAREDLIBM); \
39 ln -s $(SHAREDLIBV) $(SHAREDLIB); \
40 ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
41 (ldconfig || true) >/dev/null 2>&1; \
42 fi
43- cp zlib.3 $(man3dir)
44- chmod 644 $(man3dir)/zlib.3
45+ cp zlib.3 $(DESTDIR)$(man3dir)
46+ chmod 644 $(DESTDIR)$(man3dir)/zlib.3
47 # The ranlib in install is needed on NeXTSTEP which checks file times
48 # ldconfig is for Linux
49
50 install: install-libs
51- -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi
52- cp zlib.h zconf.h $(includedir)
53- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
54+ -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir $(DESTDIR)$(includedir); fi
55+ cp zlib.h zconf.h $(DESTDIR)$(includedir)
56+ chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
57
58 uninstall:
59 cd $(includedir); \
Note: See TracBrowser for help on using the repository browser.