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
|
#!/usr/bin/make -f
# -*- makefile -*-
DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk
DUNE_BUILD := OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p
DUNE_INSTALL := dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR)
DUNE_RUNTEST := OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p
%:
dh $@ --with ocaml
override_dh_auto_clean:
dune clean
rm -rf _tmp
override_dh_auto_build:
rm -rf _tmp
$(DUNE_BUILD) cohttp
$(DUNE_INSTALL) cohttp
$(DUNE_BUILD) cohttp-lwt
$(DUNE_INSTALL) cohttp-lwt
$(DUNE_BUILD) cohttp-lwt-unix
$(DUNE_INSTALL) cohttp-lwt-unix
$(DUNE_BUILD) cohttp-lwt-jsoo
$(DUNE_INSTALL) cohttp-lwt-jsoo
override_dh_auto_test:
$(DUNE_RUNTEST) cohttp
$(DUNE_RUNTEST) cohttp-lwt
$(DUNE_RUNTEST) cohttp-lwt-unix
$(DUNE_RUNTEST) cohttp-lwt-jsoo
override_dh_auto_install:
rm -rf debian/tmp
cp -a $(CURDIR)/_tmp debian/tmp
rm -rf debian/tmp/usr/doc/*/LICENSE*
|