File: rules

package info (click to toggle)
plastimatch 1.9.3%2Bdfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,964 kB
  • sloc: cpp: 125,198; sh: 5,800; ansic: 3,201; lisp: 896; makefile: 63; pascal: 62; fortran: 15
file content (45 lines) | stat: -rwxr-xr-x 1,147 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

include /usr/share/dpkg/architecture.mk
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

PACKAGE   = $(shell dh_listpackages)
TMP       = $(CURDIR)/debian/$(PACKAGE)

BUILD_DIR := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(CURDIR)/$(BUILD_DIR):$(TMP)/usr/lib
export LD_LIBRARY_PATH

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@

DEB_CMAKE_EXTRA_FLAGS += \
        -DCMAKE_BUILD_TYPE:STRING=RELEASE \
        -DCMAKE_SKIP_RPATH:BOOL=ON \
        -DPLM_CONFIG_DEBIAN_BUILD:BOOL=ON \
        -DBUILD_SHARED_LIBS=ON \
        -DBUILD_TESTING:BOOL=ON

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS)

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#Make the test suit fatal on supported arches
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-amd64))
	dh_auto_test
else
	dh_auto_test || true
endif
endif

override_dh_auto_install:
	dh_auto_install
	rm -rfv $(TMP)/usr/lib/*.a
	rm -rfv $(TMP)/usr/lib/cmake
	rm -rfv $(TMP)/usr/include