File: rules

package info (click to toggle)
xdffileio 0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,780 kB
  • sloc: sh: 11,327; ansic: 7,695; makefile: 112
file content (55 lines) | stat: -rwxr-xr-x 1,460 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
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f
# -*- makefile -*-

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

BASE_CFLAGS = -Wall -Wextra

# Check whether it is one of the architecture that needs the "-ffloat-store"
# hack to make standard the behavior of its floating point rounding
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),"i386 m68k"))
	BASE_CFLAGS += -ffloat-store
endif


ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	export DEB_CFLAGS_MAINT_APPEND = -O3 $(BASE_CFLAGS)
else
	export DEB_CFLAGS_MAINT_APPEND = $(BASE_CFLAGS)
endif
export DEB_LDFLAGS_MAINT_APPEND=-Wl,-Bsymbolic-functions
export DEB_BUILD_MAINT_OPTIONS=hardening=-pie,+format,+relro,+bindnow

%:
	dh  $@

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- --enable-static

override_dh_installdocs:
	dh_installdocs --link-doc=libxdffileio0

override_dh_install:
	dh_install
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --movedev debian/tmp/usr/include usr \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/*.so
	find debian -name "lib*.la" -delete

override_dh_installdocs:
	dh_installdocs
	rm -rf debian/libxdffileio0/usr/share/doc/libxdffileio0/example/
	find debian -name 'COPYING' -delete	

override_dh_auto_clean:
	dh_auto_clean
	rm -rf test