Use dh_ocaml and compute .md5sums file
authorSylvain Le Gall <gildor@debian.org>
Thu, 23 Jul 2009 23:30:09 +0000 (23:30 +0000)
committerSylvain Le Gall <gildor@debian.org>
Thu, 23 Jul 2009 23:30:09 +0000 (23:30 +0000)
* Use dh_ocaml in debian/rules and debian/control.in
* Update debian/control
* Fix use of ../ocaml.cache with regard of debian/ocamlbyteinfo

debian/control
debian/control.in
debian/rules

index 710a52a3bd2a6434839794bc530bc7dab7c8b7c9..80de8a578675e260427cc6ae3020ac4cdfa5df49 100644 (file)
@@ -29,19 +29,22 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
+ ${ocaml:Depends},
  libncurses5-dev,
- ocaml-base-nox (= ${binary:Version}),
  ocaml-interp (= ${binary:Version}),
  gcc,
  binutils
-Suggests: ocaml-doc, libgdbm-dev, tuareg-mode | ocaml-mode
-Recommends:
- camlp4,
- file
 Provides:
- ocaml-nox-${F:OCamlABI},
+ ${ocaml:Provides}, 
  ${F:BestProvides},
  libnums-ocaml-dev
+Suggests: 
+ ocaml-doc, 
+ libgdbm-dev, 
+ tuareg-mode | ocaml-mode
+Recommends:
+ camlp4,
+ file
 Replaces:
  ocaml-interp (<< 3.11.1-2),
  camlp4 (<< 3.10.0),
@@ -81,9 +84,9 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-nox (=${binary:Version})
+ ${ocaml:Depends}
 Provides:
camlp4-${F:OCamlABI}
${ocaml:Provides}
 Description: Pre Processor Pretty Printer for OCaml
  Objective Caml (OCaml) is an implementation of the ML language,
  based on the Caml Light dialect extended with a complete
@@ -104,8 +107,8 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
ocaml-nox (= ${binary:Version}),
- camlp4 (= ${binary:Version})
${ocaml:Depends},
+ camlp4-${F:OCamlABI} 
 Description: Pre Processor Pretty Printer for OCaml - extras
  Objective Caml (OCaml) is an implementation of the ML language,
  based on the Caml Light dialect extended with a complete
@@ -126,13 +129,13 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-base (= ${binary:Version}),
- ocaml-nox (=${binary:Version}),
+ ${ocaml:Depends}
  libx11-dev
+Provides: 
+ ${ocaml:Provides}
 Suggests:
  tcl8.4-dev,
  tk8.4-dev
-Provides: ocaml-${F:OCamlABI}
 Replaces: ocaml-nox (<< 3.11.0-2)
 Description: ML language implementation with a class-based object system
  Objective Caml (OCaml) is an implementation of the ML language, based on
@@ -159,10 +162,12 @@ Description: ML language implementation with a class-based object system
 
 Package: ocaml-base-nox
 Architecture: any
-Provides: ocaml-base-nox-${F:OCamlABI}, libnums-ocaml
 Depends:
  ${shlibs:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ ${ocaml:Depends}
+Provides: 
+ ${ocaml:Provides}
 Replaces:
  ocaml-interp (<< 3.11.1-2),
  ocaml-base (<< 3.07.2a-3),
@@ -186,8 +191,9 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-base-nox (= ${binary:Version})
-Provides: ocaml-base-${F:OCamlABI}
+ ${ocaml:Depends}
+Provides: 
+ ${ocaml:Provides}
 Description: Runtime system for OCaml bytecode executables
  Objective Caml (OCaml) is an implementation of the ML language, based on
  the Caml Light dialect extended with a complete class-based object system
@@ -233,12 +239,15 @@ Description: Sources for Objective Caml
 
 Package: ocaml-interp
 Architecture: any
-Provides: ocaml-interp-${F:OCamlABI}
 Depends:
ocaml-base-nox (= ${binary:Version}),
${ocaml:Depends},
  ${shlibs:Depends},
  ${misc:Depends}
+Provides: 
+ ocaml-interp-${F:OCamlABI}
 Recommends: ledit | readline-editor
+Replaces: ocaml (<< 3.07.2a-3)
+Conflicts: ocaml (<< 3.07.2a-3)
 Description: OCaml interactive interpreter and standard libraries
  Objective Caml (OCaml) is an implementation of the ML language, based on
  the Caml Light dialect extended with a complete class-based object system
@@ -249,11 +258,13 @@ Description: OCaml interactive interpreter and standard libraries
 
 Package: ocaml-compiler-libs
 Architecture: any
-Provides: ocaml-compiler-libs-${F:OCamlABI}
 Depends:
ocaml-nox (= ${binary:Version}),
${ocaml:Depends},
  ${shlibs:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ ocaml-nox-${F:OCamlABI}
+Provides: 
+ ocaml-compiler-libs-${F:OCamlABI}
 Description: OCaml interpreter and standard libraries
  Objective (OCaml) is an implementation of the ML language, based on
  the Caml Light dialect extended with a complete class-based object system
index 0966b07f49a50d6cd346f1a7949f34fd37751426..4ca1e4bf0192ea75b261d76f7ceabdcc2d809bd4 100644 (file)
@@ -1,5 +1,5 @@
 Source: ocaml
-Section: devel
+Section: ocaml
 Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
 Uploaders:
@@ -29,19 +29,22 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
+ ${ocaml:Depends},
  libncurses5-dev,
- ocaml-base-nox (= ${binary:Version}),
  ocaml-interp (= ${binary:Version}),
  gcc,
  binutils
-Suggests: ocaml-doc, libgdbm-dev, tuareg-mode | ocaml-mode
-Recommends:
- camlp4,
- file
 Provides:
- ocaml-nox-${F:OCamlABI},
+ ${ocaml:Provides}, 
  ${F:BestProvides},
  libnums-ocaml-dev
+Suggests: 
+ ocaml-doc, 
+ libgdbm-dev, 
+ tuareg-mode | ocaml-mode
+Recommends:
+ camlp4,
+ file
 Replaces:
  ocaml-interp (<< 3.11.1-2),
  camlp4 (<< 3.10.0),
@@ -81,9 +84,9 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-nox (=${binary:Version})
+ ${ocaml:Depends}
 Provides:
camlp4-${F:OCamlABI}
${ocaml:Provides}
 Description: Pre Processor Pretty Printer for OCaml
  Objective Caml (OCaml) is an implementation of the ML language,
  based on the Caml Light dialect extended with a complete
@@ -104,8 +107,8 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
ocaml-nox (= ${binary:Version}),
- camlp4 (= ${binary:Version})
${ocaml:Depends},
+ camlp4-${F:OCamlABI} 
 Description: Pre Processor Pretty Printer for OCaml - extras
  Objective Caml (OCaml) is an implementation of the ML language,
  based on the Caml Light dialect extended with a complete
@@ -126,13 +129,13 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-base (= ${binary:Version}),
- ocaml-nox (=${binary:Version}),
+ ${ocaml:Depends}
  libx11-dev
+Provides: 
+ ${ocaml:Provides}
 Suggests:
  tcl8.4-dev,
  tk8.4-dev
-Provides: ocaml-${F:OCamlABI}
 Replaces: ocaml-nox (<< 3.11.0-2)
 Description: ML language implementation with a class-based object system
  Objective Caml (OCaml) is an implementation of the ML language, based on
@@ -159,10 +162,12 @@ Description: ML language implementation with a class-based object system
 
 Package: ocaml-base-nox
 Architecture: any
-Provides: ocaml-base-nox-${F:OCamlABI}, libnums-ocaml
 Depends:
  ${shlibs:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ ${ocaml:Depends}
+Provides: 
+ ${ocaml:Provides}
 Replaces:
  ocaml-interp (<< 3.11.1-2),
  ocaml-base (<< 3.07.2a-3),
@@ -186,8 +191,9 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ocaml-base-nox (= ${binary:Version})
-Provides: ocaml-base-${F:OCamlABI}
+ ${ocaml:Depends}
+Provides: 
+ ${ocaml:Provides}
 Description: Runtime system for OCaml bytecode executables
  Objective Caml (OCaml) is an implementation of the ML language, based on
  the Caml Light dialect extended with a complete class-based object system
@@ -233,11 +239,12 @@ Description: Sources for Objective Caml
 
 Package: ocaml-interp
 Architecture: any
-Provides: ocaml-interp-${F:OCamlABI}
 Depends:
ocaml-base-nox (= ${binary:Version}),
${ocaml:Depends},
  ${shlibs:Depends},
  ${misc:Depends}
+Provides: 
+ ocaml-interp-${F:OCamlABI}
 Recommends: ledit | readline-editor
 Replaces: ocaml (<< 3.07.2a-3)
 Conflicts: ocaml (<< 3.07.2a-3)
@@ -251,11 +258,13 @@ Description: OCaml interactive interpreter and standard libraries
 
 Package: ocaml-compiler-libs
 Architecture: any
-Provides: ocaml-compiler-libs-${F:OCamlABI}
 Depends:
ocaml-nox (= ${binary:Version}),
${ocaml:Depends},
  ${shlibs:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ ocaml-nox-${F:OCamlABI}
+Provides: 
+ ocaml-compiler-libs-${F:OCamlABI}
 Description: OCaml interpreter and standard libraries
  Objective (OCaml) is an implementation of the ML language, based on
  the Caml Light dialect extended with a complete class-based object system
index c81234d4396f45a6cf58478479180c1dca559eec..c7f7a689543335bf733ba6822b2f0204268c6baf 100755 (executable)
@@ -24,6 +24,16 @@ INSTDIR = $(CURDIR)/debian/tmp/usr
 DISTDIR = $(PACKAGE)-$(OCAML_ABI)
 SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar.bz2
 
+# Environment variable for dh_ocaml 
+OCAMLBYTEINFO = debian/ocamlbyteinfo/ocamlbyteinfo
+OCAMLPLUGININFO = debian/ocamlbyteinfo/ocamlplugininfo
+OCAMLDUMPAPPROX = tools/dumpapprox
+OCAMLOBJINFO = tools/objinfo
+export OCAMLBYTEINFO
+export OCAMLPLUGININFO
+export OCAMLDUMPAPPROX
+export OCAMLOBJINFO
+
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
@@ -119,6 +129,7 @@ endif
 else
        @echo "===> WARNING: $(BUILDCACHE) detected, compilation skipped! <==="
        rsync -a --exclude=debian --exclude=.git $(BUILDCACHE)/ .
+       rsync -a $(BUILDCACHE)/debian/ocamlbyteinfo/ debian/ocamlbyteinfo/
        rm -f build-stamp install-stamp
 endif
        dh build --after dh_auto_test
@@ -215,6 +226,12 @@ ifeq (,$(OCAML_OPT_ARCH))
 else
        echo 'F:BestProvides=' >> debian/ocaml-nox.substvars
 endif
+       # Create .md5sums files and compute dependencies. Use
+       # $(OCAML_ABI) because we know that OCaml ABI represents
+       # best dependencies for OCaml package.
+       dh_ocaml \
+        --runtime-map ocaml-nox:ocaml-base-nox,ocaml:ocaml-base,camlp4 \
+        --checksum $(OCAML_ABI)
        dh_gencontrol
        dh binary --after dh_gencontrol
        touch $@