File: rules

package info (click to toggle)
dose3 7.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,276 kB
  • sloc: ml: 25,053; python: 605; perl: 391; sh: 347; makefile: 187
file content (45 lines) | stat: -rwxr-xr-x 1,459 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
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk

ifeq (,$(filter pkg.dose3.noextra, $(DEB_BUILD_PROFILES)))
DUNE_EXTRAPROFILE=,dose3-extra
endif

%:
	dh $@ --with ocaml

# Instead of running "dune build" via "make all" we run dune with -p dose3
# because otherwise we get this error on salsaci:
# Error: Too many opam files for package "dose3":
# - debian/output/source_dir/dose3.opam
# - dose3.opam
override_dh_auto_build-arch:
	dune build -p dose3$(DUNE_EXTRAPROFILE) @install --verbose
	make -C doc/manpages man
	pod2man --section 8 -release "apt-cudf $(RELEASE)" \
		debian/update-cudf-solvers > debian/update-cudf-solvers.8

override_dh_auto_build-indep:
	dune build -p dose3$(DUNE_EXTRAPROFILE) @doc
	# running targets manually because we don't want to build the "pages"
	make -C doc/debcheck.primer
	make -C doc/apt-external-solvers.primer
	make -C doc/manpages html

override_dh_auto_install-arch:
	dune install -p dose3$(DUNE_EXTRAPROFILE) --destdir=$(DESTDIR) --prefix=/usr --libdir=$(OCAML_STDLIB_DIR)
	rm -f $(DESTDIR)/usr/doc/dose3/README.git
	rm -f $(DESTDIR)/usr/doc/dose3/README.architecture
	rm -f $(DESTDIR)/usr/doc/dose3/CHANGES

# No install or test needed for docs
override_dh_auto_test-indep:
override_dh_auto_install-indep:

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dune runtest -p dose3$(DUNE_EXTRAPROFILE)
endif