File: rules

package info (click to toggle)
js-of-ocaml 5.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,020 kB
  • sloc: ml: 91,250; javascript: 57,289; ansic: 315; makefile: 271; lisp: 23; sh: 6; perl: 4
file content (35 lines) | stat: -rwxr-xr-x 1,398 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml --buildsystem ocaml_dune

execute_before_dh_auto_build:
	rm -f compiler/tests-jsoo/dune         # makes the build fail on amd64
	rm -f compiler/lib-runtime/tests/dune  # makes the build fail on bytecode architectures
ifeq ($(OCAML_HAVE_OCAMLOPT),no)
	sed -i 's/ native//' compiler/bin-js_of_ocaml/dune
endif
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter libjs-of-ocaml-doc,$(shell dh_listpackages)))
	$(MAKE) doc
endif
endif

override_dh_auto_test:
# Needs ppx-expect, ppx-hash, node, Uchar.utf_decode...

execute_after_dh_install-indep:
	mkdir -p debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc
	rm -rf debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc/api
	rm -rf debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc/manual
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	cp -a doc-dev/api debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc/api
	cp -a doc-dev/manual debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc/manual
	find debian/libjs-of-ocaml-doc -type f -empty -delete
	sed -i \
	  's@href=".*//maxcdn\.bootstrapcdn\.com/bootstrap.*/bootstrap\.min\.css"@href="file:///usr/share/javascript/bootstrap/css/bootstrap.min.css"@g' \
	  debian/libjs-of-ocaml-doc/usr/share/doc/libjs-of-ocaml-doc/manual/files/toplevel/index.html
endif