Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 1 | #!/usr/bin/make -f |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 2 | |
| 3 | # Uncomment this to turn on verbose mode. |
| 4 | #export DH_VERBOSE=1 |
| 5 | |
Eric Butler | b5372ab | 2012-08-14 20:43:47 -0700 | [diff] [blame] | 6 | DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) |
| 7 | DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) |
| 8 | VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') |
| 9 | |
Max | 126def7 | 2016-12-21 11:35:13 +0100 | [diff] [blame] | 10 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
Holger Hans Peter Freyther | e7c18dd | 2016-01-18 13:30:28 +0100 | [diff] [blame] | 11 | |
Max | 126def7 | 2016-12-21 11:35:13 +0100 | [diff] [blame] | 12 | export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions |
Holger Hans Peter Freyther | 6308c29 | 2013-12-12 12:31:18 +0100 | [diff] [blame] | 13 | |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 14 | %: |
Holger Hans Peter Freyther | 9a935e2 | 2013-08-12 11:47:12 +0200 | [diff] [blame] | 15 | dh $@ --with autoreconf --fail-missing |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 16 | |
Holger Hans Peter Freyther | a5007db | 2013-02-13 19:27:42 +0100 | [diff] [blame] | 17 | override_dh_strip: |
| 18 | dh_strip --dbg-package=libosmocore-dbg |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 19 | |
Holger Hans Peter Freyther | 9a935e2 | 2013-08-12 11:47:12 +0200 | [diff] [blame] | 20 | override_dh_install: |
| 21 | sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` |
| 22 | dh_install |
| 23 | |
Holger Hans Peter Freyther | 4cb8b94 | 2013-10-10 15:20:23 +0200 | [diff] [blame] | 24 | # Print test results in case of a failure |
| 25 | override_dh_auto_test: |
| 26 | dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) |
| 27 | |
Max | 936151b | 2016-04-24 12:01:03 +0200 | [diff] [blame] | 28 | override_dh_auto_configure: |
Pau Espin Pedrol | 16b076c | 2020-08-25 13:56:43 +0200 | [diff] [blame] | 29 | dh_auto_configure -- --enable-static --disable-sctp-tests |
Max | 126def7 | 2016-12-21 11:35:13 +0100 | [diff] [blame] | 30 | |
| 31 | override_dh_clean: |
| 32 | dh_clean |
| 33 | $(RM) .version |
| 34 | $(RM) debian/man/osmo-arfcn.1 |
| 35 | $(RM) debian/man/osmo-auc-gen.1 |
| 36 | $(RM) include/osmocom/core/bit16gen.h |
| 37 | $(RM) include/osmocom/core/bit32gen.h |
| 38 | $(RM) include/osmocom/core/bit64gen.h |
| 39 | $(RM) include/osmocom/core/crc16gen.h |
| 40 | $(RM) include/osmocom/core/crc32gen.h |
| 41 | $(RM) include/osmocom/core/crc64gen.h |
| 42 | $(RM) include/osmocom/core/crc8gen.h |
| 43 | $(RM) src/crc16gen.c |
| 44 | $(RM) src/crc32gen.c |
| 45 | $(RM) src/crc64gen.c |
| 46 | $(RM) src/crc8gen.c |
| 47 | $(RM) tests/package.m4 |
| 48 | $(RM) tests/testsuite |
| 49 | $(RM) -r doc/codec/ |
| 50 | $(RM) -r doc/core/ |
Harald Welte | 572fc2d | 2018-05-28 17:49:54 +0200 | [diff] [blame] | 51 | $(RM) -r doc/ctrl/ |
Max | 126def7 | 2016-12-21 11:35:13 +0100 | [diff] [blame] | 52 | $(RM) -r doc/gsm/ |
Max | 70861e3 | 2017-06-27 13:51:02 +0200 | [diff] [blame] | 53 | $(RM) -r doc/gb/ |
Max | 126def7 | 2016-12-21 11:35:13 +0100 | [diff] [blame] | 54 | $(RM) -r doc/vty/html/ |
| 55 | $(RM) -r doc/vty/latex/ |