1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/usr/bin/make -f
include /usr/share/ocaml/ocamlvars.mk
OCAML_NATIVE_ARCHS := $(subst lpia,,$(OCAML_NATIVE_ARCHS))
BUILDDIR=debian/tmp
export OCAMLFIND_DESTDIR=$(OCAML_STDLIB_DIR)
%:
dh $@ --with ocaml,tex
override_dh_auto_configure:
autoconf
dh_auto_configure -- \
--disable-emacs-compilation \
--disable-coq-libs \
--libdir=$(OCAML_STDLIB_DIR)
override_dh_auto_build-arch:
$(MAKE) all byte
# MATHJAXBAD="https://cdn\.jsdelivr\.net/npm/mathjax.*\.js"
# MATHJAXLOCAL="/usr/share/javascript/mathjax/MathJax.js"
# override_dh_auto_build-indep:
# $(MAKE) doc
# cd doc/html; \
# for f in *.html; do \
# sed -e "s|$(MATHJAXBAD)|$(MATHJAXLOCAL)|" $$f > $$f.out; \
# mv $$f.out $$f; \
# done
override_dh_auto_install:
# do nothing
override_dh_install-arch: build-arch
$(MAKE) install install-lib DESTDIR=$(CURDIR)/$(BUILDDIR)
dh_install -a -XLICENSE
override_dh_install-indep:
# do nothing
override_dh_installexamples:
dh_installexamples
if [ -d debian/why3-examples/usr/share/doc/why3-examples/examples ]; \
then \
find debian/why3-examples/usr/share/doc/why3-examples/examples \
-name why3shapes.gz \
-exec sh -c 'if [ $$(zcat {} | wc -c) -eq 0 ]; then \rm {}; fi' \;;\
fi
override_dh_compress:
dh_compress -Xmanual.pdf
ifneq ($(wildcard debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cmxs),)
WHY3IDE_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cmxs | sed -n 's/Name: //p' | xargs echo | tr ' ' ,)
else
WHY3IDE_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cma | sed -n 's/Unit name: //p' | xargs echo | tr ' ' ,)
endif
WHY3HYPO_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/plugins/hypothesis_selection.cma | sed -n 's/Unit name: //p' | xargs echo | tr ' ' ,)
override_dh_ocaml:
dh_ocaml --nodefined-map=why3:$(WHY3IDE_UNITS),$(WHY3HYPO_UNITS)
|