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
|
include /usr/share/dpkg/architecture.mk
include /usr/share/ocaml/ocamlvars.mk
%:
dh $@ --with ocaml
OCAMLABI = $(shell ocamlc -version)
BYTECODE = $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
OCAMLRUN = $(if $(BYTECODE),ocaml-base-nox-$(OCAMLABI))
OCAML_NATIVE = $(if $(BYTECODE),false,true)
OCAMLBUILD_CFG = \
OCAMLBUILD_PREFIX=/usr \
OCAMLBUILD_BINDIR=/usr/bin \
OCAMLBUILD_LIBDIR=/usr/lib/ocaml \
OCAMLBUILD_MANDIR=/usr/share/man
unexport OCAMLPARAM
unexport OCAML_TOPLEVEL_PATH
ifeq ($(DEB_HOST_ARCH),powerpc)
export PATH := $(CURDIR)/debian/bin:$(PATH)
endif
override_dh_auto_configure:
$(MAKE) $(OCAMLBUILD_CFG) OCAML_NATIVE=$(OCAML_NATIVE) configure
override_dh_auto_install:
dh_auto_install -- CHECK_IF_PREINSTALLED=false
cd debian/ocamlbuild/usr/bin && rm -f ocamlbuild.byte ocamlbuild.native
override_dh_auto_clean:
dh_auto_clean
find . -name '*.cmti' -delete
override_dh_gencontrol:
dh_gencontrol -- -VF:OCamlRun="$(OCAMLRUN)"
|