File: rules

package info (click to toggle)
react 1.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,136 kB
  • ctags: 655
  • sloc: ml: 3,843; makefile: 27
file content (39 lines) | stat: -rwxr-xr-x 766 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 -*-

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/ocaml/ocamlvars.mk

BUILD_ARGS :=

ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
  BUILD_ARGS += native=true
else
  BUILD_ARGS += native=false
endif

ifeq ($(OCAML_NATDYNLINK),yes)
  BUILD_ARGS += native-dynlink=true
else
  BUILD_ARGS += native-dynlink=false
endif

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_build
override_dh_auto_build:
	ocaml pkg/build.ml $(BUILD_ARGS)

.PHONY: override_dh_auto_install
override_dh_auto_install:
	opam-installer --prefix=debian/tmp --libdir=.$(OCAML_STDLIB_DIR) --docdir=usr/share/doc react.install

.PHONY: override_dh_install
override_dh_install:
	dh_install --fail-missing

.PHONY: override_dh_compress
override_dh_compress:
	dh_compress -X.ml