File: rules

package info (click to toggle)
ocaml-dune 2.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,064 kB
  • sloc: ml: 70,777; lisp: 466; ansic: 241; sh: 209; makefile: 119; python: 38; cpp: 17; javascript: 6
file content (39 lines) | stat: -rwxr-xr-x 1,442 bytes parent folder | download | duplicates (2)
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 -*-

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

include /usr/share/ocaml/ocamlvars.mk

export DESTDIR=$(CURDIR)/debian/tmp
export PREFIX=/usr
export LIBDIR=..$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	dh_auto_clean
	rm -rf _tmp

override_dh_auto_configure:
	./configure --libdir /usr/lib/ocaml

override_dh_auto_build:
	ocaml bootstrap.ml
	./dune.exe build -p dune --profile dune-bootstrap
	./dune.exe install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) dune
	PATH=$(CURDIR)/_tmp/usr/bin:$(PATH) OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p dune-private-libs
	PATH=$(CURDIR)/_tmp/usr/bin:$(PATH) OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) dune-private-libs
	PATH=$(CURDIR)/_tmp/usr/bin:$(PATH) OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p dune-configurator
	PATH=$(CURDIR)/_tmp/usr/bin:$(PATH) OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) dune-configurator

override_dh_auto_install:
	rm -rf debian/tmp
	cp -a _tmp debian/tmp
	rm -rf debian/tmp/usr/doc/dune-private-libs debian/tmp/usr/doc/dune-configurator debian/tmp/usr/doc/dune/LICENSE.md

override_dh_auto_test:
# Upstream tests assume opam is installed; skip them