File: rules

package info (click to toggle)
libvsqlitepp 0.3.13-4.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 296 kB
  • sloc: cpp: 765; makefile: 79; sh: 31
file content (64 lines) | stat: -rwxr-xr-x 1,467 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
59
60
61
62
63
64
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/dpkg/default.mk

# ABI major version
somajor=$(shell perl -ne 'print $$1 if m{libvsqlitepp.so.(\d+)};' Makefile.am)
# The base library name
plib=$(DEB_SOURCE)$(somajor)v5
pdev=$(DEB_SOURCE)-dev
pdoc=$(DEB_SOURCE)-doc

# Ensure the build aborts when there are still references to undefined
# symbols: LDFLAGS += -Wl,-z,defs

export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_clean:
	$(RM) -r html
	dh_clean

override_dh_auto_test:
	dh_auto_test
	# Run mini-test
	./vsqlitepp_example

override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_install-arch:
	$(info I: library-name=$(plib))
	$(if $(filter $(plib),$(shell dh_listpackages)),,\
		$(error binary package '$(plib)' not declared in debian/control))
	dh_install -p$(plib) --autodest \
            usr/lib/*/lib*.so.*
	dh_install -p$(pdev) --autodest \
            usr/include/*/*             \
            usr/lib/*/lib*.so

html:
	doxygen
	$(RM) -v html/*.md5 html/*.map
	# De-duplication in "html" folder:
	rdfind -outputname /dev/null -makesymlinks true html
	symlinks -rsc html

override_dh_installdocs: html
	dh_installdocs

override_dh_missing-indep:
	dh_missing -i --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -v -V

override_dh_gencontrol:
	dh_gencontrol -v -- -Vplib=$(plib)