added registry feeding targets, just type "make feeding" and sample md5sum
authorStefano Zacchiroli <zack@debian.org>
Mon, 11 Apr 2005 09:19:22 +0000 (09:19 +0000)
committerStefano Zacchiroli <zack@debian.org>
Mon, 11 Apr 2005 09:19:22 +0000 (09:19 +0000)
entries for the standard ocaml installation will be created

Makefile

index 0cb668dee83cc666031172a2be6840df598d96cf..f0c0d71a436e6f2df43803f41019f938fe6fd696 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,10 +2,13 @@
 SCRIPTS = postinst-ocaml postrm-ocaml
 # DEBHELPER_VERSION := $(shell grep-available -X -F Package -s Version debhelper | cut -f 2 -d ' ')
 DEBHELPER_VERSION = 4.2.32
+OCAML_VERSION = 3.08.3
+OCAML_LIB_DIR = /usr/lib/ocaml/$(OCAML_VERSION)
 DEBHELPER_DSC = debhelper_$(DEBHELPER_VERSION).dsc
 NEW_DEBHELPER_VERSION = $(DEBHELPER_VERSION)+dh_ocaml
 DEBHELPER_DIR = debhelper-$(DEBHELPER_VERSION)
 NEW_DEBHELPER_DIR = debhelper-$(NEW_DEBHELPER_VERSION)
+FED_SUMS = ocaml-nox.md5sums ocaml.md5sums ocaml-compiler-libs.md5sums
 
 # all: ocaml-md5sums $(SCRIPTS) debhelper
 all: ocaml-md5sums $(SCRIPTS)
@@ -25,9 +28,28 @@ debhelper: $(SCRIPTS) $(DEBHELPER_DSC)
                && dch --newversion $(NEW_DEBHELPER_VERSION) "added dh_ocaml"   \
                && debuild binary
 
+feeding: $(FED_SUMS)
+%.md5sums: ocaml-md5sums
+       dpkg -L $* \
+       | grep '.cm[ao]' \
+       | grep -v ^$(OCAML_LIB_DIR)/ocamldoc/ \
+       | grep -v ^$(OCAML_LIB_DIR)/camlp4/ \
+       | ./ocaml-md5sums compute \
+               --package $*-$(OCAML_VERSION) \
+               --runtime $(patsubst ocaml%, ocaml-base%, $*)-$(OCAML_VERSION) \
+       | sort -k 2 \
+       > $@
+ocaml-compiler-libs.md5sums: ocaml-md5sums ocaml-nox.md5sums
+       dpkg -L ocaml-compiler-libs \
+       | grep '.cm[ao]' \
+       | ./ocaml-md5sums compute \
+        --package ocaml-compiler-libs-$(OCAML_VERSION) \
+       | sort -k 2 \
+       > $@
+
 %: %.in
        wml -p 1-3 $< > $@
 
 clean:
-       rm -f $(TARGETS)
+       rm -f $(TARGETS) $(FED_SUMS)