File: rules

package info (click to toggle)
ocaml-conduit 4.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 504 kB
  • sloc: ml: 2,752; makefile: 43; sh: 36
file content (33 lines) | stat: -rwxr-xr-x 1,150 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
#!/usr/bin/make -f
# -*- makefile -*-

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	dune clean
	rm -rf _tmp

override_dh_auto_build:
	rm -rf _tmp
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p conduit
	dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) conduit
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p conduit-lwt
	dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) conduit-lwt
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p conduit-lwt-unix
	dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) conduit-lwt-unix

override_dh_auto_test:
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p conduit
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p conduit-lwt
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p conduit-lwt-unix

override_dh_auto_install:
	rm -rf debian/tmp
	cp -a $(CURDIR)/_tmp debian/tmp
	for u in conduit-lwt-unix; do rm -rf $(DESTDIR)/usr/doc/$$u; done
	rm -rf debian/tmp/usr/doc/*/LICENSE*