File: rules

package info (click to toggle)
google-glog 0.6.0-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,336 kB
  • sloc: cpp: 9,590; sh: 141; ansic: 115; makefile: 47
file content (80 lines) | stat: -rwxr-xr-x 2,119 bytes parent folder | download | duplicates (3)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/make -f
# -*- makefile -*-

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
BUILDDIR = obj-$(DEB_HOST_MULTIARCH)

CONFIGURE_ARGS= \
 -DCMAKE_BUILD_TYPE=Release \
 -DLIB_INSTALL_DIR:STRING="lib/$(DEB_HOST_MULTIARCH)"

override_dh_auto_configure-arch:
	# statically linked
	dh_auto_configure -B $(BUILDDIR)-static \
		-- $(CONFIGURE_ARGS) \
		-DBUILD_SHARED_LIBS=OFF \
		-DBUILD_TESTING=OFF

	# dynamically linked
	dh_auto_configure -B $(BUILDDIR) \
		-- $(CONFIGURE_ARGS) \
		-DBUILD_SHARED_LIBS=ON \
		-DBUILD_TESTING=ON

override_dh_auto_configure-indep:
	# not needed

override_dh_auto_build-arch:
	# statically linked
	dh_auto_build -a -B $(BUILDDIR)-static
	# dynamically linked
	dh_auto_build -a -B $(BUILDDIR)

override_dh_auto_build-indep:
	# not needed


override_dh_auto_install-arch:
	dh_auto_install -a -O--buildsystem=cmake -B $(BUILDDIR)-static
	dh_auto_install -a -O--buildsystem=cmake -B $(BUILDDIR)
	# put the static libs together with the rest of the stuff
	cp -v $(BUILDDIR)-static/*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
	-$(RM) -r $(BUILDDIR)-static
	find $(CURDIR)/debian/tmp/ -type d -name .cmake | xargs -r rm -rfv

override_dh_auto_install-indep:
	# not needed

override_dh_install-arch:
	dh_install -a -O--buildsystem=cmake
ifneq (,$(findstring $(DEB_HOST_ARCH),amd64 i386 ia64))
	dh_install -plibgoogle-glog-dev debian/tmp/usr/share/glog usr/share/
endif

override_dh_install-indep:
	# not needed

override_dh_auto_test-arch:
	-if [ -f /proc/version ]; then $(MAKE) check; fi

override_dh_auto_test-indep:
	# not needed

override_dh_compress:
	dh_compress -X.rst

%:
	dh  $@ --buildsystem=cmake

get-orig-source:
	uscan --verbose --force-download --rename

.PHONY: override_dh_auto_configure-arch override_dh_auto_configure-indep \
	override_dh_auto_build-arch override_dh_auto_build-indep \
	override_dh_auto_install-arch override_dh_auto_install-indep \
	override_dh_install-arch override_dh_install-indep \
	override_dh_auto_test-arch override_dh_auto_test-indep \
	override_dh_compress