File: rules

package info (click to toggle)
dmalloc 5.5.2-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,344 kB
  • ctags: 2,584
  • sloc: ansic: 13,021; makefile: 433; perl: 175; sh: 173; cpp: 36
file content (58 lines) | stat: -rwxr-xr-x 1,681 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
56
57
58
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk

ver := $(firstword $(subst -, ,$(shell dpkg-parsechangelog -S Version)))
ver_major := $(firstword $(subst ., ,$(ver)))

export DEB_CFLAGS_MAINT_APPEND = -Wall -D__NO_STRING_INLINES

%:
	dh $@

override_dh_auto_configure:
	mv -f configure configure.orig
	autoconf
	dh_auto_configure -- --enable-threads --enable-shlib
	mv -f configure.orig configure

override_dh_auto_build:
	dh_auto_build
	cd docs && $(MAKE) dmalloc.info

override_dh_auto_test:
	# special tests are known to fail
	-$(MAKE) heavy

override_dh_auto_install:
	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr

	# Creating symlinks
	cd $(CURDIR)/debian/tmp/usr/lib/* && \
		ln -s libdmalloc.so.$(ver) libdmalloc.so.$(ver_major) && \
		ln -s libdmalloc.so.$(ver) libdmalloc.so
	cd $(CURDIR)/debian/tmp/usr/lib/* && \
		ln -s libdmallocth.so.$(ver) libdmallocth.so.$(ver_major) && \
		ln -s libdmallocth.so.$(ver) libdmallocth.so
	cd $(CURDIR)/debian/tmp/usr/lib/* && \
		ln -s libdmalloccxx.so.$(ver) libdmalloccxx.so.$(ver_major) && \
		ln -s libdmalloccxx.so.$(ver) libdmalloccxx.so
	cd $(CURDIR)/debian/tmp/usr/lib/* && \
		ln -s libdmallocthcxx.so.$(ver) libdmallocthcxx.so.$(ver_major) && \
		ln -s libdmallocthcxx.so.$(ver) libdmallocthcxx.so

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.1

override_dh_compress:
	dh_compress -Xusr/share/doc/libdmalloc-dev/examples

override_dh_makeshlibs:
	ln -sf libdmalloc5.symbols.cxx.$(DEB_HOST_ARCH_BITS)bit \
		debian/libdmalloc5.symbols.cxx
	dh_makeshlibs