File: rules

package info (click to toggle)
ocaml-zarith 1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 588 kB
  • sloc: ansic: 2,839; ml: 1,912; sh: 1,589; asm: 1,035; makefile: 80; perl: 54
file content (31 lines) | stat: -rwxr-xr-x 777 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
#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

Z_INSTALL_DIR=$(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)

override_dh_auto_install:
ifneq (,$(findstring libzarith-ocaml-doc,$(shell dh_listpackages)))
	$(MAKE) doc
endif
	mkdir -p $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)/stublibs
	$(MAKE) install

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
	$(MAKE) tests
endif
endif

override_dh_auto_configure:
	for ext in guess; do \
		if [ -f /usr/share/misc/config.$$ext ]; then \
			cp -f /usr/share/misc/config.$$ext $(CURDIR)/config.$$ext; \
		fi; \
	done
	./configure --installdir $(Z_INSTALL_DIR) \
                    --host $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

%:
	dh $@ --with ocaml --no-parallel