File: rules

package info (click to toggle)
ocaml-dune 3.20.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,564 kB
  • sloc: ml: 175,178; asm: 28,570; ansic: 5,251; sh: 1,096; lisp: 625; makefile: 148; python: 125; cpp: 48; javascript: 10
file content (40 lines) | stat: -rwxr-xr-x 1,240 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
#!/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

DESTDIR=$(CURDIR)/debian/tmp

DEB_DUNE_OTHER_PACKAGES := dune-private-libs dune-configurator dune-build-info dune-site stdune xdg dyn ordering

DEB_DUNE_ALL_PACKAGES := dune
ifeq (,$(filter pkg.ocaml-dune.bootstrap,$(DEB_BUILD_PROFILES)))
DEB_DUNE_ALL_PACKAGES += $(DEB_DUNE_OTHER_PACKAGES)
endif

%:
	dh $@ --with ocaml

override_dh_auto_configure:
	./configure --libdir $(OCAML_STDLIB_DIR)

override_dh_auto_build:
	ocaml boot/bootstrap.ml
	./dune.exe build --release --profile dune-bootstrap dune.install
ifeq (,$(filter pkg.ocaml-dune.bootstrap,$(DEB_BUILD_PROFILES)))
	./dune.exe build --release $(addsuffix .install,$(DEB_DUNE_OTHER_PACKAGES))
endif

override_dh_auto_install:
	./dune.exe install --release --destdir=$(DESTDIR) --prefix=/usr --libdir=$(OCAML_STDLIB_DIR) $(DEB_DUNE_ALL_PACKAGES)
ifeq (,$(filter pkg.ocaml-dune.bootstrap,$(DEB_BUILD_PROFILES)))
	rm -rf $(addprefix debian/tmp/usr/doc/,$(DEB_DUNE_OTHER_PACKAGES))
endif
	rm -f debian/tmp/usr/doc/dune/LICENSE.md

override_dh_auto_test:
# Upstream tests have many dependencies; rely on autopkgtest instead