File: rules

package info (click to toggle)
fuse-zip 0.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,776 kB
  • sloc: cpp: 5,509; sh: 2,587; makefile: 193
file content (36 lines) | stat: -rwxr-xr-x 1,189 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# for relinking fuse-zip during make install
DPKG_EXPORT_BUILDTOOLS=1
-include /usr/share/dpkg/buildtools.mk

LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
CXXFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
valgrind_arch = amd64 arm64 armhf i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el s390x

# valgrind tests fail on these archs.
valgrind_arch_failing = mips64el powerpc

override_dh_auto_install:
	dh_auto_install -- CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" prefix=/usr

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq (,$(filter $(DEB_HOST_ARCH),$(filter-out $(valgrind_arch_failing),$(valgrind_arch))))
	$(MAKE) -C tests/whitebox CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" test
else
	# Run valgrind tests on the arch where there is valgrind and no failure on 2025-04-20.
	$(MAKE) -C tests/whitebox CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" valgrind
endif
endif

override_dh_auto_build:
	dh_auto_build -- CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"

%:
	dh $@