# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-TARGETDIR = debian/tmp
-OCAML_STDLIB_DIR = $(shell ocamlc -where)
+OCAMLABI := $(shell ocamlc -version)
+OCAMLLIBDIR := $(shell ocamlc -where)
+OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
+ocamlinit:
+ for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
configure: configure-stamp
configure-stamp:
dh_testdir
dh_clean -k
dh_installdirs
- mkdir -p $(TARGETDIR)$(OCAML_STDLIB_DIR)
- $(MAKE) install PREFIX=$(TARGETDIR)$(OCAML_STDLIB_DIR)
+ mkdir -p debian/tmp$(OCAMLLIBDIR)
+ $(MAKE) install PREFIX=debian/tmp$(OCAMLLIBDIR)
binary-arch: build install
dh_install
dh_fixperms
dh_installdeb
dh_shlibdeps
- dh_gencontrol
+ dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
dh_md5sums
dh_builddeb