File: rules

package info (click to toggle)
yajl 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,104 kB
  • sloc: ansic: 4,426; sh: 144; makefile: 25
file content (43 lines) | stat: -rwxr-xr-x 1,506 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
#!/usr/bin/make -f

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

yajl_major := $(shell grep -E 'SET.*YAJL_MAJOR[[:space:]]+[0-9]+' CMakeLists.txt | sed 's/.*YAJL_MAJOR\s\+\([0-9]\+\).*/\1/' )
yajl_minor := $(shell grep -E 'SET.*YAJL_MINOR[[:space:]]+[0-9]+' CMakeLists.txt | sed 's/.*YAJL_MINOR\s\+\([0-9]\+\).*/\1/' )
yajl_micro := $(shell grep -E 'SET.*YAJL_MICRO[[:space:]]+[0-9]+' CMakeLists.txt | sed 's/.*YAJL_MICRO\s\+\([0-9]\+\).*/\1/' )
yajl_dir   := yajl-$(yajl_major).$(yajl_minor).$(yajl_micro)

DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

# Needed if building with clang
export DEB_CFLAGS_MAINT_APPEND = -fvisibility=hidden

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS_CONFIG := -DCMAKE_TOOLCHAIN_FILE="/etc/dpkg-cross/cmake/CMakeCross.txt"
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -v -Scmake -- -DMULTIARCH_TUPLE=$(DEB_HOST_MULTIARCH) $(DEB_CMAKE_CUSTOM_FLAGS) $(CROSS_CONFIG)

override_dh_auto_build-indep:
	$(MAKE) -C obj-$(DEB_HOST_GNU_TYPE) doc

# We don't want to test the lib if we're just building docs
override_dh_auto_test-indep: ;

override_dh_auto_install-indep:
	cp -pR obj-$(DEB_HOST_GNU_TYPE)/$(yajl_dir)/share/doc/$(yajl_dir)/* debian/libyajl-doc/usr/share/doc/libyajl-doc/html

override_dh_installdocs:
	dh_installdocs -A README TODO

override_dh_compress:
	dh_compress -Xexamples

override_dh_strip:
	dh_strip --dbgsym-migration='libyajl2-dbg (<< 2.1.0-3~)' -Nyajl-tools
	dh_strip -pyajl-tools