File: rules

package info (click to toggle)
lwt 5.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,316 kB
  • sloc: ml: 20,067; ansic: 6,551; makefile: 186; sh: 87; python: 62
file content (43 lines) | stat: -rwxr-xr-x 1,112 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/ocaml/ocamlvars.mk

export OCAMLPATH := $(CURDIR)/_tmp$(OCAML_STDLIB_DIR)
DUNE_INSTALL := dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_auto_build:
	dune build -p lwt
	$(DUNE_INSTALL) lwt
	dune build -p lwt_ppx
	$(DUNE_INSTALL) lwt_ppx
	dune build -p lwt_react
	$(DUNE_INSTALL) lwt_react
	mkdir _tmp/tmp
	cp debian/print_page_size.ml _tmp/tmp
	( cd _tmp/tmp && ocamlfind ocamlc -thread -package lwt.unix -linkpkg -custom print_page_size.ml && ./a.out )
	rm -rf _tmp/tmp

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dune runtest -p lwt
# lwt_ppx tests are broken as of 5.1.1
#	dune runtest -p lwt_ppx
	dune runtest -p lwt_react
endif

override_dh_auto_install:
	rm -rf debian/tmp
	cp -a $(CURDIR)/_tmp debian/tmp
	rm -rf debian/tmp/usr/doc/lwt_ppx debian/tmp/usr/doc/lwt_react debian/tmp/usr/doc/lwt/LICENSE.md

override_dh_missing:
	dh_missing --fail-missing