File: rules

package info (click to toggle)
ustr 1.0.4-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,676 kB
  • ctags: 3,052
  • sloc: ansic: 19,041; makefile: 935; perl: 779; sh: 686; xml: 97
file content (52 lines) | stat: -rwxr-xr-x 1,371 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
#!/usr/bin/make -f

include /usr/share/quilt/quilt.make
-include /usr/share/topgit/tg2quilt.mk

/usr/share/topgit/tg2quilt.mk:
	@true

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

build_debug=${shell grep '^Package:.*debug' debian/control && echo 1}

ifeq (${build_debug},)
    build_target=all-opt
    install_target=install-opt
else
    build_target=all all-shared
    install_target=install
endif


%:
	dh $@ --with autoreconf

override_dh_auto_build:
	${MAKE} ${build_target}

override_dh_auto_install:
	${MAKE} ${install_target} DESTDIR=debian/tmp \
		libdir=\$${prefix}/lib/${DEB_HOST_MULTIARCH} \
		bin_arch_prefix=${DEB_HOST_MULTIARCH}- \
		includedir_arch=\$${includedir}/${DEB_HOST_MULTIARCH}

override_dh_installdocs:
	dh_installdocs -plibustr-1.0-1-dbg --link-doc=libustr-1.0-1
	dh_installdocs -plibustr-dev --link-doc=libustr-1.0-1
ifneq (${build_debug},)
	dh_installdocs -plibustr-debug-1.0-1-dbg --link-doc=libustr-debug-1.0-1
	dh_installdocs -plibustr-debug-dev --link-doc=libustr-debug-1.0-1
endif
	dh_installdocs

override_dh_strip:
	dh_strip -plibustr-1.0-1 --dbg-package=libustr-1.0-1-dbg
ifneq (${build_debug},)
	dh_strip -plibustr-debug-1.0-1 --dbg-package=libustr-debug-1.0-1-dbg
endif
	dh_strip --exclude=libustr-debug.a

override_dh_clean:
	test -f Makefile && fgrep -q maintainer-clean Makefile && ${MAKE} maintainer-clean || true
	dh_clean