File: rules

package info (click to toggle)
ocamlgraph 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,500 kB
  • sloc: ml: 18,364; xml: 151; makefile: 27; sh: 1
file content (25 lines) | stat: -rwxr-xr-x 691 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
#!/usr/bin/make -f

DESTDIR := $(CURDIR)/debian/tmp
METAFILE := $(DESTDIR)/usr/lib/ocaml/ocamlgraph/META

%:
	dh $@ --with ocaml

override_dh_auto_build:
	dune build -pocamlgraph @install
	dune build -pocamlgraph @doc
	find _build/default/_doc/_html -name "*.dune-keep" -delete

override_dh_auto_install:
	touch _build/default/ocamlgraph_gtk.install
	DESTDIR=$(DESTDIR) dune install -pocamlgraph
	(if [ ! `grep -q "version" $(METAFILE)` ]; then \
	  version=$$(dpkg-parsechangelog -S version); \
	  echo "version = \"$${version%-*}\"" > $(METAFILE).new ;\
	  cat $(METAFILE) >> $(METAFILE).new ; \
	  mv $(METAFILE).new $(METAFILE) ;\
	fi)

override_dh_auto_test:
	dune runtest -pocamlgraph