1diff -Nuar camlzip-1.04/Makefile camlzip-1.04.nixpkgs/Makefile
2--- camlzip-1.04/Makefile 2002-04-22 17:28:57.000000000 +0200
3+++ camlzip-1.04.nixpkgs/Makefile 2010-12-12 18:30:49.000000000 +0100
4@@ -4,14 +4,10 @@
5 ZLIB_LIB=-lz
6
7 # The directory containing the Zlib library (libz.a or libz.so)
8-ZLIB_LIBDIR=/usr/local/lib
9+ZLIB_LIBDIR=@ZLIB_LIBDIR@
10
11 # The directory containing the Zlib header file (zlib.h)
12-ZLIB_INCLUDE=/usr/local/include
13-
14-# Where to install the library. By default: sub-directory 'zip' of
15-# OCaml's standard library directory.
16-INSTALLDIR=`$(OCAMLC) -where`/zip
17+ZLIB_INCLUDE=@ZLIB_INCLUDE@
18
19 ### End of configuration section
20
21@@ -19,10 +15,13 @@
22 OCAMLOPT=ocamlopt
23 OCAMLDEP=ocamldep
24 OCAMLMKLIB=ocamlmklib
25+OCAMLFIND=ocamlfind
26
27 OBJS=zlib.cmo zip.cmo gzip.cmo
28 C_OBJS=zlibstubs.o
29
30+LIBINSTALL_FILES = $(wildcard *.mli *.cmi *.cma *.cmxa *.a *.so)
31+
32 all: libcamlzip.a zip.cma
33
34 allopt: libcamlzip.a zip.cmxa
35@@ -55,18 +54,7 @@
36 rm -f *.o *.a
37
38 install:
39- mkdir -p $(INSTALLDIR)
40- cp zip.cma zip.cmi gzip.cmi zip.mli gzip.mli libcamlzip.a $(INSTALLDIR)
41- if test -f dllcamlzip.so; then \
42- cp dllcamlzip.so $(INSTALLDIR); \
43- ldconf=`$(OCAMLC) -where`/ld.conf; \
44- installdir=$(INSTALLDIR); \
45- if test `grep -s -c $$installdir'$$' $$ldconf || :` = 0; \
46- then echo $$installdir >> $$ldconf; fi \
47- fi
48-
49-installopt:
50- cp zip.cmxa zip.a zip.cmx gzip.cmx $(INSTALLDIR)
51+ $(OCAMLFIND) install camlzip META $(LIBINSTALL_FILES)
52
53 depend:
54 gcc -MM -I$(ZLIB_INCLUDE) *.c > .depend