source: scripts/patches/zlib-1.2.2-add_DESTDIR-1.patch @ c0cf39e

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since c0cf39e was 7f65c0e, checked in by Jim Gifford <clfs@…>, 18 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.3 KB
  • zlib-1.2.2/Makefile.

    old new  
    2323#CFLAGS=-g -DDEBUG
    2424#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    2525#           -Wstrict-prototypes -Wmissing-prototypes
    26 
     26DESTDIR=
    2727LDFLAGS=libz.a
    2828LDSHARED=$(CC)
    2929CPP=$(CC) -E
     
    9090        $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
    9191
    9292install: $(LIBS)
    93         -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
    94         -@if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
    95         -@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
    96         -@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
    97         cp zlib.h zconf.h $(includedir)
    98         chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
    99         cp $(LIBS) $(libdir)
    100         cd $(libdir); chmod 755 $(LIBS)
    101         -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
    102         cd $(libdir); if test -f $(SHAREDLIBV); then \
     93        -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
     94        -@if [ ! -d $(DESTDIR)$(includedir)  ]; then mkdir -p $(DESTDIR)$(includedir); fi
     95        -@if [ ! -d $(DESTDIR)$(libdir)      ]; then mkdir -p $(DESTDIR)$(libdir); fi
     96        -@if [ ! -d $(DESTDIR)$(man3dir)     ]; then mkdir -p $(DESTDIR)$(man3dir); fi
     97        cp zlib.h zconf.h $(DESTDIR)$(includedir)
     98        chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
     99        cp $(LIBS) $(DESTDIR)$(libdir)
     100        cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
     101        -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
     102        cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
    103103          rm -f $(SHAREDLIB) $(SHAREDLIBM); \
    104104          ln -s $(SHAREDLIBV) $(SHAREDLIB); \
    105105          ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
    106106          (ldconfig || true)  >/dev/null 2>&1; \
    107107        fi
    108         cp zlib.3 $(man3dir)
    109         chmod 644 $(man3dir)/zlib.3
     108        cp zlib.3 $(DESTDIR)$(man3dir)
     109        chmod 644 $(DESTDIR)$(man3dir)/zlib.3
    110110# The ranlib in install is needed on NeXTSTEP which checks file times
    111111# ldconfig is for Linux
    112112
    113113uninstall:
    114         cd $(includedir); \
    115         cd $(libdir); rm -f libz.a; \
     114        cd $(DESTDIR)$(includedir); \
     115        cd $(DESTDIR)$(libdir); rm -f libz.a; \
    116116        if test -f $(SHAREDLIBV); then \
    117117          rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
    118118        fi
    119         cd $(man3dir); rm -f zlib.3
     119        cd $(DESTDIR)$(man3dir); rm -f zlib.3
    120120
    121121mostlyclean: clean
    122122clean:
Note: See TracBrowser for help on using the repository browser.