blob: dc609f94143e9d77b31f157effc2bce6aa43c4ff [file] [log] [blame]
Harald Welte640d72a2010-08-24 15:33:04 +02001#!/usr/bin/make -f
Harald Welte640d72a2010-08-24 15:33:04 +02002
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
Eric Butler010c9552012-08-14 21:01:20 -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
Max5fa8b082016-12-19 18:41:42 +010010export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Holger Hans Peter Freyther12355ae2013-12-12 12:50:18 +010011
Harald Welte640d72a2010-08-24 15:33:04 +020012%:
Pau Espin Pedrol42249292018-09-10 14:10:29 +020013 dh $@ --sourcedirectory=openbsc --with=systemd --with autoreconf
Eric Butlera73ca052012-08-14 17:40:58 -070014
Holger Hans Peter Freyther93fda872012-11-06 19:26:50 +010015# This is needed for debian stable (squeeze)
16override_dh_autoreconf:
17 cd openbsc && autoreconf --install --force
18
Holger Hans Peter Freyther65f74272013-12-12 13:07:47 +010019override_dh_strip:
Harald Weltecb1838d2017-10-26 00:33:26 +020020 dh_strip -posmocom-bsc-sccplite --dbg-package=osmocom-bsc-sccplite-dbg
Holger Hans Peter Freyther65f74272013-12-12 13:07:47 +010021 dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
22 dh_strip -posmocom-ipaccess-utils --dbg-package=osmocom-ipaccess-utils-dbg
23 dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg
Holger Hans Peter Freyther65f74272013-12-12 13:07:47 +010024 dh_strip -posmocom-bsc-nat --dbg-package=osmocom-bsc-nat-dbg
25
Eric Butlera73ca052012-08-14 17:40:58 -070026override_dh_auto_configure:
Pau Espin Pedrol42249292018-09-10 14:10:29 +020027 dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system
Eric Butlera73ca052012-08-14 17:40:58 -070028
Neels Hofmeyre18b3412017-10-25 16:52:48 +020029# Print test results in case of a failure
30override_dh_auto_test:
31 dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)