blob: 2399b01f5bd72aca7391df85a94886f6baaa7498 [file] [log] [blame]
Harald Welted4bb7ab2010-08-24 15:17:13 +02001#!/usr/bin/make -f
Harald Welted4bb7ab2010-08-24 15:17:13 +02002
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
Eric Butlerb5372ab2012-08-14 20:43:47 -07006DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
7DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
8VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
9
Max126def72016-12-21 11:35:13 +010010export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Holger Hans Peter Freythere7c18dd2016-01-18 13:30:28 +010011
Max126def72016-12-21 11:35:13 +010012export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
Holger Hans Peter Freyther6308c292013-12-12 12:31:18 +010013
Harald Welted4bb7ab2010-08-24 15:17:13 +020014%:
Holger Hans Peter Freyther9a935e22013-08-12 11:47:12 +020015 dh $@ --with autoreconf --fail-missing
Harald Welted4bb7ab2010-08-24 15:17:13 +020016
Holger Hans Peter Freythera5007db2013-02-13 19:27:42 +010017override_dh_strip:
18 dh_strip --dbg-package=libosmocore-dbg
Harald Welted4bb7ab2010-08-24 15:17:13 +020019
Holger Hans Peter Freyther9a935e22013-08-12 11:47:12 +020020override_dh_install:
21 sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
22 dh_install
23
Holger Hans Peter Freyther4cb8b942013-10-10 15:20:23 +020024# Print test results in case of a failure
25override_dh_auto_test:
26 dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
27
Eric Butlerb5372ab2012-08-14 20:43:47 -070028override_dh_autoreconf:
29 echo $(VERSION) > .tarball-version
30 dh_autoreconf
Max936151b2016-04-24 12:01:03 +020031
32override_dh_auto_configure:
33 dh_auto_configure -- --enable-static
Max126def72016-12-21 11:35:13 +010034
35override_dh_clean:
36 dh_clean
37 $(RM) .version
38 $(RM) debian/man/osmo-arfcn.1
39 $(RM) debian/man/osmo-auc-gen.1
40 $(RM) include/osmocom/core/bit16gen.h
41 $(RM) include/osmocom/core/bit32gen.h
42 $(RM) include/osmocom/core/bit64gen.h
43 $(RM) include/osmocom/core/crc16gen.h
44 $(RM) include/osmocom/core/crc32gen.h
45 $(RM) include/osmocom/core/crc64gen.h
46 $(RM) include/osmocom/core/crc8gen.h
47 $(RM) src/crc16gen.c
48 $(RM) src/crc32gen.c
49 $(RM) src/crc64gen.c
50 $(RM) src/crc8gen.c
51 $(RM) tests/package.m4
52 $(RM) tests/testsuite
53 $(RM) -r doc/codec/
54 $(RM) -r doc/core/
55 $(RM) -r doc/gsm/
Max70861e32017-06-27 13:51:02 +020056 $(RM) -r doc/gb/
Max126def72016-12-21 11:35:13 +010057 $(RM) -r doc/vty/html/
58 $(RM) -r doc/vty/latex/