diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/debian/rules b/debian/rules index 04a75b29..014134a7 100755 --- a/debian/rules +++ b/debian/rules @@ -14,9 +14,7 @@ export CAML_LD_LIBRARY_PATH = $(shell pwd)/kernel/byterun # Show full commands when building Coq export VERBOSE=1 -# We want to use dpatch -include /usr/share/dpatch/dpatch.make -include /usr/share/ocaml/ocamlvars.mk +include /usr/share/ocaml/ocamlinit.mk HTMLDOC := doc/stdlib/html/index.html @@ -25,34 +23,20 @@ ADDPREF := COQINSTALLPREFIX=$(COQPREF) PACKAGES := $(shell awk '/Package:/{print $$2}' debian/control) -OFILES := $(patsubst %.in,%,$(wildcard debian/*.in)) - -# Beware: -1 is part of upstream version -COQVERSION := 8.2-1 - -COQ_ABI := $(COQVERSION)+$(OCAML_ABI) +COQ_VERSION := $(shell head -n1 debian/changelog | awk -F'[+() ]' '{print $$3}') +COQ_ABI := $(COQ_VERSION)+$(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%@OCamlDllDir@%$(OCAML_DLL_DIR)%g' -e '/^\#/d' - -ifneq ($(OCAML_OPT_ARCH),) - # CONFIGUREOPTS += -opt - OCAMLINITSED += -e 's/^OPT: //' -else - OCAMLINITSED += -e '/^OPT: /d' -endif - -ocamlinit: ocamlinit-stamp -ocamlinit-stamp: - for f in $(OFILES); do sed $(OCAMLINITSED) $$f.in > $$f; done - touch $@ +OCAMLINIT_SED += \ + -e 's%@CoqVersion@%$(COQ_VERSION)%' \ + -e 's%@CoqABI@%$(COQ_ABI)%' configure: configure-stamp -configure-stamp: patch-stamp ocamlinit-stamp +configure-stamp: ocamlinit-stamp dh build --before dh_auto_configure ./configure $(CONFIGUREOPTS) touch $@ @@ -83,7 +67,6 @@ 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 "$(COQ_ABI)" > debian/coq/usr/lib/coq/abi cp debian/coqvars.mk debian/coq/usr/share/coq/ dh install --after dh_install for u in $(PACKAGES); do \ @@ -92,9 +75,8 @@ install-stamp: build-stamp done touch $@ -clean: unpatch +clean: ocamlinit-clean dh $@ - rm -f $(OFILES) binary-indep: install-stamp dh $@ |