[034d620] | 1 | Submitted By: Jim Gifford <jim@linuxfromscratch.org>
|
---|
| 2 | Date: 2006-12-02
|
---|
| 3 | Initial Package Version: 1.2.3
|
---|
| 4 | Origin: Jim Gifford
|
---|
| 5 | Upstream Status: Not submitted
|
---|
| 6 | Description: Adds DESTDIR Support
|
---|
| 7 |
|
---|
| 8 | diff -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); \
|
---|