File: rules

package info (click to toggle)
elpi 1.16.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 49,572 kB
  • sloc: ml: 16,100; makefile: 208; python: 95
file content (29 lines) | stat: -rwxr-xr-x 918 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml

override_dh_auto_build:
	sed -e 's/%%VERSION_NUM%%/$(DEB_VERSION_UPSTREAM)/g' -i elpi_REPL.ml
	sed -e 's/%%VERSION_NUM%%/$(DEB_VERSION_UPSTREAM)/g' -i src/compiler.ml
	make build

override_dh_auto_test:
	make tests

override_dh_auto_install:
	dune install --destdir=$(CURDIR)/debian/tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR)
	# drop excess LICENSE files
	find debian/tmp -name "LICENSE*" -delete
	# drop legacy stuff
	rm -rf debian/tmp/usr/doc/elpi-option-legacy-parser debian/tmp/usr/lib/ocaml/elpi-option-legacy-parser
	# we detect what to ship
	find debian/tmp -regextype posix-awk \
	  -regex '.*\.(cma|cmxs)$$' \
	  >> debian/libelpi-ocaml.install
	find debian/tmp -regextype posix-awk \
	  -regex '.*\.(a|cmi|cmo|cmt|cmti|cmx|cmxa|ml|mli|o])$$' \
	  >> debian/libelpi-ocaml-dev.install