summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorGravatar Samuel Mimram <smimram@debian.org>2009-02-19 13:28:17 +0100
committerGravatar Samuel Mimram <smimram@debian.org>2009-02-19 14:04:55 +0100
commit822ee2f2f71d84af35d3adede92a857ce6159b89 (patch)
treedea4ba525830870ac069f8d32a9e949658e0d7ce /debian/rules
parent217a759bdf92847445bddfdf4aa2135930bf5462 (diff)
Use variables from dh-ocaml in rules.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules15
1 files changed, 7 insertions, 8 deletions
diff --git a/debian/rules b/debian/rules
index 4c135a31..eede101b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,7 @@ export VERBOSE=1
# We want to use dpatch
include /usr/share/dpatch/dpatch.make
+include /usr/share/ocaml/ocamlvars.mk
HTMLDOC := doc/stdlib/html/index.html
@@ -25,22 +26,20 @@ ADDPREF := COQINSTALLPREFIX=$(COQPREF)
PACKAGES := $(shell awk '/Package:/{print $$2}' debian/control)
OFILES := $(patsubst %.in,%,$(wildcard debian/*.in))
-OCAMLABI := $(shell ocamlc -version)
# Beware: -1 is part of upstream version
COQVERSION := 8.2-1
-COQABI := $(COQVERSION)+$(OCAMLABI)
+COQ_ABI := $(COQVERSION)+$(OCAML_ABI)
CONFIGUREOPTS := --arch Linux --prefix /usr --mandir /usr/share/man \
--emacslib /usr/share/emacs/site-lisp/coq --reals all --fsets all \
--browser "/usr/bin/x-www-browser %s &" \
--with-doc no --coqrunbyteflags "-dllib -lcoqrun"
-OCAMLINITSED := -e 's/@OCamlABI@/$(OCAMLABI)/g' -e '/^\#/d'
-OCAMLOPT := $(wildcard /usr/bin/ocamlopt*)
+OCAMLINITSED := -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%g' -e '/^\#/d'
-ifneq ($(OCAMLOPT),)
+ifneq ($(OCAML_OPT_ARCH),)
# CONFIGUREOPTS += -opt
OCAMLINITSED += -e 's/^OPT: //'
else
@@ -84,11 +83,11 @@ install-stamp: build-stamp
cp debian/coq.xpm debian/coqide/usr/share/pixmaps/coqide.xpm
cp debian/coqide.desktop debian/coqide/usr/share/applications
cp -r doc/stdlib/html debian/coq-theories/usr/share/doc/coq-theories/
- echo "$(COQABI)" > debian/coq/usr/lib/coq/abi
+ echo "$(COQ_ABI)" > debian/coq/usr/lib/coq/abi
dh install --after dh_install
for u in $(PACKAGES); do \
- echo 'F:OCamlABI=$(OCAMLABI)' >> debian/$$u.substvars; \
- echo 'F:CoqABI=$(COQABI)' >> debian/$$u.substvars; \
+ echo 'F:OCamlABI=$(OCAML_ABI)' >> debian/$$u.substvars; \
+ echo 'F:CoqABI=$(COQ_ABI)' >> debian/$$u.substvars; \
done
touch $@