aboutsummaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: a8eeff523256ebdf06d9d14341d01505badfef27 (plain)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEBIAN  := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')

%:
	dh $@ --with autoreconf

override_dh_strip:
	dh_strip -plibosmo-sigtran3 --dbg-package=libosmo-sigtran-dbg
	dh_strip -posmo-stp --dbg-package=osmo-stp-dbg

override_dh_install:
	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
	dh_install

# enable-static: we require the tests to link to the static libosmo-sigtran
# library to access symbols not starting with osmo_*
override_dh_auto_configure:
	dh_auto_configure -- --enable-static --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals

# Print test results in case of a failure
override_dh_auto_test:
	dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)

override_dh_clean:
	dh_clean
	rm -f .version tests/package.m4 tests/testsuite

# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
override_dh_compress:
	dh_compress -X.pdf