File: rules

package info (click to toggle)
ocaml-uri 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 984 kB
  • sloc: ml: 2,841; makefile: 34
file content (31 lines) | stat: -rwxr-xr-x 822 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
#!/usr/bin/make -f
# -*- makefile -*-

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/ocaml/ocamlvars.mk

export OCAMLFIND_DESTDIR := $(DESTDIR)/$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	dune clean
	rm -rf _tmp

override_dh_auto_build:
	dune build -p uri
	opam-installer --prefix=$(CURDIR)/_tmp/usr --libdir=..$(OCAML_STDLIB_DIR) uri.install
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p uri-sexp
	opam-installer --prefix=$(CURDIR)/_tmp/usr --libdir=..$(OCAML_STDLIB_DIR) uri-sexp.install

override_dh_auto_test:
	dune runtest -p uri
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p uri-sexp

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