blob: f5b71ebb6a0b8dbeacb50c214c18b7f4e0a9f9dc [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
Max936151b2016-04-24 12:01:03 +020028override_dh_auto_configure:
Harald Welte700822b2021-02-03 14:52:13 +010029 dh_auto_configure -- --enable-static --disable-sctp-tests --enable-systemd-logging
Max126def72016-12-21 11:35:13 +010030
31override_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 Welte572fc2d2018-05-28 17:49:54 +020051 $(RM) -r doc/ctrl/
Max126def72016-12-21 11:35:13 +010052 $(RM) -r doc/gsm/
Max70861e32017-06-27 13:51:02 +020053 $(RM) -r doc/gb/
Max126def72016-12-21 11:35:13 +010054 $(RM) -r doc/vty/html/
55 $(RM) -r doc/vty/latex/