File: rules

package info (click to toggle)
gvm-libs 22.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,500 kB
  • sloc: ansic: 31,263; makefile: 26
file content (41 lines) | stat: -rwxr-xr-x 1,011 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
#!/usr/bin/make -f

export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# only build the tests if cgreen is present
BUILD_TEST := $(shell if [ -e /usr/include/cgreen/cgreen.h ]; then echo 'yes'; else echo 'no'; fi)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-DLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
		-DBUILD_WITH_LDAP=ON \
		-DBUILD_WITH_RADIUS=yes \
		-DBUILD_TESTS=$(BUILD_TEST) \
		$(NULL)

# Architecture: all only: build the doxygen documentation
override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- doc
endif

# doxygen documentation is installed using dh_installdocs
override_dh_auto_install-indep:

# don't run test when we build only the doc
override_dh_auto_test-indep:

override_dh_auto_test-arch:
ifeq ($(BUILD_TEST),yes)
	dh_auto_build -- tests
	dh_auto_test
endif

override_dh_missing:
	dh_missing --fail-missing