File: rules

package info (click to toggle)
msgpack-c 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,324 kB
  • sloc: cpp: 85,510; ansic: 6,921; sh: 31; makefile: 30
file content (40 lines) | stat: -rwxr-xr-x 1,240 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
#!/usr/bin/make -f

DPKG_VER = $(shell dpkg-query --show --showformat '$${source:Version}' dpkg-dev)

ifeq (yes,$(shell dpkg --compare-versions '$(DPKG_VER)' ge 1.18.23 && printf 'yes'))
  export DEB_BUILD_MAINT_OPTIONS=hardening=+all
else
  export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
endif
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS

%:
	dh $@ --buildsystem=cmake+ninja --builddirectory=build

override_dh_auto_configure:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p build-gtest
	cd build-gtest && \
	  cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=$(CURDIR)/build-gtest/install -DBUILD_GMOCK=OFF -DBUILD_GTEST=ON /usr/src/googletest && \
	  make install
endif
	env GTEST_ROOT=$(CURDIR)/build-gtest/install dh_auto_configure -- -DMSGPACK_CXX11=ON -DMSGPACK_ENABLE_SHARED=ON -DMSGPACK_ENABLE_CXX=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build-indep:
	dh_auto_build -- doxygen

override_dh_install-indep:
	dh_install -i

override_dh_installdocs-indep:
	mkdir -p build/html
	mv build/doc_c/html build/html/msgpack-c
	mv build/doc_cpp/html build/html/msgpack-cpp
	dh_installdocs
	dh_doxygen

override_dh_auto_test-indep: