Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | # Sample debian/rules that uses debhelper. |
| 4 | # This file was originally written by Joey Hess and Craig Small. |
| 5 | # As a special exception, when this file is copied by dh-make into a |
| 6 | # dh-make output file, you may use that output file without restriction. |
| 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
| 8 | |
| 9 | # Uncomment this to turn on verbose mode. |
| 10 | #export DH_VERBOSE=1 |
| 11 | |
Eric Butler | b5372ab | 2012-08-14 20:43:47 -0700 | [diff] [blame] | 12 | DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) |
| 13 | DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) |
| 14 | VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') |
| 15 | |
Holger Hans Peter Freyther | e7c18dd | 2016-01-18 13:30:28 +0100 | [diff] [blame] | 16 | # Our tests want to override symbols, make it possible on Ubuntu |
| 17 | export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,-Bsymbolic-functions//') |
| 18 | |
Holger Hans Peter Freyther | 6308c29 | 2013-12-12 12:31:18 +0100 | [diff] [blame] | 19 | export DEB_BUILD_HARDENING=1 |
| 20 | |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 21 | %: |
Holger Hans Peter Freyther | 9a935e2 | 2013-08-12 11:47:12 +0200 | [diff] [blame] | 22 | dh $@ --with autoreconf --fail-missing |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 23 | |
Holger Hans Peter Freyther | a5007db | 2013-02-13 19:27:42 +0100 | [diff] [blame] | 24 | override_dh_strip: |
| 25 | dh_strip --dbg-package=libosmocore-dbg |
Harald Welte | d4bb7ab | 2010-08-24 15:17:13 +0200 | [diff] [blame] | 26 | |
Holger Hans Peter Freyther | 9a935e2 | 2013-08-12 11:47:12 +0200 | [diff] [blame] | 27 | override_dh_install: |
| 28 | sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` |
| 29 | dh_install |
| 30 | |
Holger Hans Peter Freyther | 4cb8b94 | 2013-10-10 15:20:23 +0200 | [diff] [blame] | 31 | # Print test results in case of a failure |
| 32 | override_dh_auto_test: |
| 33 | dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false) |
| 34 | |
Eric Butler | b5372ab | 2012-08-14 20:43:47 -0700 | [diff] [blame] | 35 | override_dh_autoreconf: |
| 36 | echo $(VERSION) > .tarball-version |
| 37 | dh_autoreconf |