]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtkmathview/debian/rules
ocaml 3.09 transition
[helm.git] / helm / DEVEL / lablgtkmathview / debian / rules
index ed0e94113cffed374a5a59264c61e2744c0b3e15..832767abbe788849c7bf761960ba930399005707 100755 (executable)
@@ -5,9 +5,12 @@
 # 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
@@ -39,8 +42,8 @@ install: build
        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
@@ -57,7 +60,7 @@ binary-arch: build install
        dh_fixperms
        dh_installdeb
        dh_shlibdeps
-       dh_gencontrol
+       dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
        dh_md5sums
        dh_builddeb