File: rules

package info (click to toggle)
ocaml-csv 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 392 kB
  • sloc: ml: 2,117; makefile: 84
file content (32 lines) | stat: -rwxr-xr-x 815 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
#!/usr/bin/make -f
# -*- makefile -*-

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/ocaml/ocamlvars.mk

DB2MAN := /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
XP := xsltproc -''-nonet

%:
	dh $@ --with ocaml

debian/csvtool.1: debian/csvtool.dbk
	$(XP) -o $@ $(DB2MAN) $<

override_dh_auto_build: debian/csvtool.1
	dune build -p csv
	opam-installer --prefix=$(CURDIR)/_tmp/usr --libdir=..$(OCAML_STDLIB_DIR) csv.install
	OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p csvtool
	opam-installer --prefix=$(CURDIR)/_tmp/usr --libdir=..$(OCAML_STDLIB_DIR) csvtool.install

override_dh_auto_install:
	rm -rf debian/tmp
	cp -a $(CURDIR)/_tmp debian/tmp
	rm -rf debian/tmp/usr/doc/csv*/LICENSE.md

override_dh_auto_test:
	dune runtest -p csv

override_dh_missing:
	dh_missing --fail-missing