- more extensive use of debhelper 7
- do no longer use deprecated dh_movefiles and *.files
- get closer to CDBS API
+ - use ocamlinit snippet provided by dh-ocaml
- add a build cache (for Debian debugging)
- ship labltk examples in a tarball
- reflect original locations of camlp4 *.mli files in binary packages
* Build and install dumpapprox, and provide a manpage
* Discriminate *-nox packages in short descriptions (thanks Lintian)
- -- Stephane Glondu <steph@glondu.net> Mon, 16 Feb 2009 00:27:36 +0100
+ -- Stephane Glondu <steph@glondu.net> Mon, 16 Feb 2009 16:49:39 +0100
ocaml (3.11.0-1) experimental; urgency=low
OCAMLMAJOR := 3.11
OCAMLMINOR := 0
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+OCAML_OPT_ARCH ?= $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
+
# Build cache (for Debian debugging)
BUILDCACHE := $(wildcard ../ocaml.cache)
-# These are also in CDBS
+# These are defined in ocamlvars.mk, but we redefine it since ocaml is not installed
OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR)
OCAML_STDLIB_DIR := /usr/lib/ocaml/$(OCAML_ABI)
OCAML_DLL_DIR = $(OCAML_STDLIB_DIR)/stublibs
OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs)
+OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no)
+
+# We do not want ocamlvars.mk to be sourced again
+_cdbs_class_ocaml_vars = 1
+include /usr/share/cdbs/2/rules/ocamlinit.mk
MD5SUMSDIR = /var/lib/ocaml/md5sums
INSTDIR = $(CURDIR)/debian/tmp/usr
# This has to be exported to make some magic below work.
export DH_OPTIONS
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-OCAML_OPT_ARCH ?= $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
-
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)/lib/ocaml/$(OCAML_ABI)%g" \
-e "s%STUBLIBDIR=.*$$%STUBLIBDIR=\$$(PREFIX)/lib/ocaml/$(OCAML_ABI)/stublibs%g"
-# These are also in CDBS
-OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-OCAMLINIT_SED := -e 's%^ \+%%' \
- -e 's%@OCamlABI@%$(OCAML_ABI)%' \
- -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%' \
- -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%'
-ifeq (,$(OCAML_OPT_ARCH))
- OCAMLINIT_SED += -e '/^OPT: /d'
-else
- OCAMLINIT_SED += -e 's/^OPT: //'
-endif
patch-stamp: debian/$(SRCTARBALL)
-
ocamlinit-stamp: debian/$(SRCTARBALL)
- for t in $(OCAML_IN_FILES); do \
- sed $(OCAMLINIT_SED) $$t.in > $$t; \
- done
- touch $@
# Generate ocaml-native-compilers' Architecture field.
# Should never be called automatically.
dh build --after dh_auto_test
touch $@
-clean: unpatch
+clean: unpatch ocamlinit-clean
dh clean --before dh_auto_clean
ifneq ($(wildcard $(CURDIR)/config/Makefile),)
$(MAKE) clean
sed -i 1d emacs/ocamltags.in; \
fi
# Remaining stuff
- -rm -Rf debian/$(SRCTARBALL) $(OCAML_IN_FILES)
+ -rm -Rf debian/$(SRCTARBALL)
dh clean --after dh_auto_clean
install: install-stamp