The following commit has been merged in the master branch:
commit 127f874946480218f7d4ea1c6ed24ceee8c3b511
Author: Eric Cooper <e...@cmu.edu>
Date:   Sun Mar 1 18:15:43 2009 -0500

    use modified upstream Makefile with ocamlmklib

diff --git a/Makefile b/Makefile
index e41bfa7..6e82f44 100644
--- a/Makefile
+++ b/Makefile
@@ -1,61 +1,16 @@
-CC = gcc
-CFLAGS = -Wall -O3 -funroll-loops
 OCAMLC = ocamlc
 OCAMLOPT = ocamlopt
-OCAML_PATH = $(shell $(OCAMLC) -where)
-CFLAGS += -I $(OCAML_PATH)
+OCAMLMKLIB = ocamlmklib
 
-OCAMLOPTFLAGS =
+all: byte-code-library native-code-library
+byte-code-library: sha.cma
+native-code-library: sha.cmxa
 
-OCAML_TEST_INC = -I `ocamlfind query oUnit`
-OCAML_TEST_LIB = `ocamlfind query oUnit`/oUnit.cmxa
+sha.cma: sha.cmo $(foreach n, 1 256 512,sha$(n).cmi sha$(n).lib.o 
sha$(n)_stubs.o sha$(n).cmo)
+       $(OCAMLMKLIB) -o sha $(filter-out %.cmi,$^)
 
-PROGRAMS = sha1sum sha256sum sha512sum
-
-all: sha1.cmi sha1.cma sha1.cmxa sha256.cma sha256.cmxa sha512.cma sha512.cmxa
-
-bins: $(PROGRAMS)
-
-sha1sum: sha.cmx sha1.cmxa sha256.cmxa sha512.cmxa shasum.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -o $@ $+
-
-sha256sum: sha1sum
-       cp $< $@
-
-sha512sum: sha1sum
-       cp $< $@
-
-sha1.cma: sha.cmo sha1.cmi sha1.lib.o sha1_stubs.o sha1.cmo
-       $(OCAMLC) -a -o $@ -custom sha1.lib.o sha1_stubs.o sha1.cmo
-
-sha1.cmxa: sha.cmx sha1.cmi sha1.lib.o sha1_stubs.o sha1.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ sha1.lib.o sha1_stubs.o sha1.cmx
-
-sha256.cma: sha256.cmi sha256.lib.o sha256_stubs.o sha256.cmo
-       $(OCAMLC) -a -o $@ -custom sha256.lib.o sha256_stubs.o sha256.cmo
-
-sha256.cmxa: sha256.cmi sha256.lib.o sha256_stubs.o sha256.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ sha256.lib.o sha256_stubs.o 
sha256.cmx
-
-sha512.cma: sha512.cmi sha512.lib.o sha512_stubs.o sha512.cmo
-       $(OCAMLC) -a -o $@ -custom sha512.lib.o sha512_stubs.o sha512.cmo
-
-sha512.cmxa: sha512.cmi sha512.lib.o sha512_stubs.o sha512.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ sha512.lib.o sha512_stubs.o 
sha512.cmx
-
-tests: sha.test
-       ./sha.test
-
-sha.test: sha1.cmxa sha256.cmxa sha512.cmxa sha.test.cmx
-
-%.test:
-       $(OCAMLOPT) -o $@ $(OCAML_BFLAGS) unix.cmxa $(OCAML_TEST_INC) 
$(OCAML_TEST_LIB) $+
-
-%.test.cmo: %.test.ml
-       $(OCAMLC) -c -o $@ $(OCAML_BFLAGS) -custom $(OCAML_TEST_INC) $<
-
-%.test.cmx: %.test.ml
-       $(OCAMLOPT) -c -o $@ $(OCAML_BFLAGS) $(OCAML_TEST_INC) $<
+sha.cmxa: sha.cmx $(foreach n, 1 256 512, sha$(n).cmi sha$(n).lib.o 
sha$(n)_stubs.o sha$(n).cmx)
+       $(OCAMLMKLIB) -o sha $(filter-out %.cmi,$^)
 
 %.cmo: %.ml
        $(OCAMLC) -c -o $@ $<
@@ -64,13 +19,10 @@ sha.test: sha1.cmxa sha256.cmxa sha512.cmxa sha.test.cmx
        $(OCAMLC) -c -o $@ $<
 
 %.cmx: %.ml
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -o $@ $<
-
-%.o: %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
+       $(OCAMLOPT) -c -o $@ $<
 
 %.lib.o: %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
+       $(CC) -Wall -O3 -funroll-loops -c -o $@ $<
 
 clean:
-       rm -f *.o *.a *.cmo *.cmi *.cma *.cmx *.cmxa sha.test $(PROGRAMS)
+       rm -f *.o *.a *.cm* dll*.so
diff --git a/debian/Makefile b/debian/Makefile
deleted file mode 100644
index ce42b88..0000000
--- a/debian/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-OCAMLMAKEFILE = /usr/share/ocamlmakefile/OCamlMakefile
-
-RESULT = sha
-
-SOURCES = sha.ml $(foreach n,1 256 512,sha$(n).mli sha$(n).ml sha$(n)_stubs.c)
-CFLAGS = -Wall -O3 -funroll-loops
-OCAMLDOCFLAGS = -keep-code
-NO_CUSTOM = yes
-
-all: byte-code-library
-
-include $(OCAMLMAKEFILE)
diff --git a/debian/changelog b/debian/changelog
index c77442f..9ffaa4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ocaml-sha (1.5-1) unstable; urgency=low
+
+  * New upstream version
+  * Use modified upstream Makefile
+  * Add dh-ocaml and drop ocamlmakefile from build-deps
+
+ -- Eric Cooper <e...@cmu.edu>  Sun, 01 Mar 2009 16:39:29 -0500
+
 ocaml-sha (1.4-6) UNRELEASED; urgency=low
 
   [ Stefano Zacchiroli ]
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 26e866c..2597b40 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: devel
 Priority: optional
 Maintainer: Eric Cooper <e...@cmu.edu>
 Uploaders: Ralf Treinen <trei...@debian.org>
-XS-DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 5.0), cdbs, ocaml-nox (>= 3.10), ocamlmakefile, 
ocaml-findlib
+DM-Upload-Allowed: yes
+Build-Depends: debhelper (>= 5.0), cdbs, ocaml-nox (>= 3.11), dh-ocaml, 
ocaml-findlib
 Standards-Version: 3.8.0
 Homepage: http://tab.snarc.org/projects/ocaml_sha
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocaml-sha.git
@@ -13,8 +13,6 @@ Vcs-Browser: 
http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml-sha.git
 Package: libsha-ocaml
 Architecture: any
 Section: libs
-Replaces: libsha1-ocaml
-Conflicts: libsha1-ocaml
 Depends: ocaml-base-nox-${F:OCamlABI}, ${shlibs:Depends}
 Description: SHA cryptographic hash functions for OCaml
  SHA-1 produces a 160-bit digest from its input.
@@ -27,8 +25,6 @@ Package: libsha-ocaml-dev
 Architecture: any
 Section: libdevel
 Depends: ocaml-nox-${F:OCamlABI}, libsha-ocaml (= ${binary:Version})
-Replaces: libsha1-ocaml-dev
-Conflicts: libsha1-ocaml-dev
 Description: SHA cryptographic hash functions for OCaml
  SHA-1 produces a 160-bit digest from its input.
  SHA-256 and SHA-512 produce 256-bit and 512-bit digests
diff --git a/debian/libsha-ocaml-dev.install.in 
b/debian/libsha-ocaml-dev.install.in
index 5dd6bbe..6d9cad7 100644
--- a/debian/libsha-ocaml-dev.install.in
+++ b/debian/libsha-ocaml-dev.install.in
@@ -1 +1 @@
-{META,*.mli,*.cmi,*.cm*a,*.a}  @OCamlStdlibDir@/sha
+{META,sha{1,256,512}.{mli,cmi},*.cm*a,*.a}     @OCamlStdlibDir@/sha
diff --git a/debian/libsha-ocaml.install.in b/debian/libsha-ocaml.install.in
index de138de..486832c 100644
--- a/debian/libsha-ocaml.install.in
+++ b/debian/libsha-ocaml.install.in
@@ -1 +1 @@
-dllsha_stubs.so                @OCamlStdlibDir@/stublibs
+dllsha.so              @OCamlDllDir@
diff --git a/debian/rules b/debian/rules
index 534a5b2..5310016 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,11 +2,10 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/class/ocaml.mk
+include /usr/share/cdbs/1/rules/ocaml.mk
 
 OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES)
 
-DEB_MAKE_MAKEFILE = debian/Makefile
 DEB_MAKE_BUILD_TARGET = byte-code-library
 ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
     DEB_MAKE_BUILD_TARGET += native-code-library

-- 
ocaml-sha packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to