Harald Welte | 640d72a | 2010-08-24 15:33:04 +0200 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | # Sample debian/rules that uses debhelper. |
| 4 | # |
| 5 | # This file was originally written by Joey Hess and Craig Small. |
| 6 | # As a special exception, when this file is copied by dh-make into a |
| 7 | # dh-make output file, you may use that output file without restriction. |
| 8 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
| 9 | # |
| 10 | # Modified to make a template file for a multi-binary package with separated |
| 11 | # build-arch and build-indep targets by Bill Allombert 2001 |
| 12 | |
| 13 | # Uncomment this to turn on verbose mode. |
| 14 | #export DH_VERBOSE=1 |
| 15 | |
Eric Butler | 010c955 | 2012-08-14 21:01:20 -0700 | [diff] [blame] | 16 | DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) |
| 17 | DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) |
| 18 | VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') |
| 19 | |
Holger Hans Peter Freyther | 12355ae | 2013-12-12 12:50:18 +0100 | [diff] [blame] | 20 | export DEB_BUILD_HARDENING=1 |
| 21 | |
Harald Welte | 640d72a | 2010-08-24 15:33:04 +0200 | [diff] [blame] | 22 | %: |
Holger Hans Peter Freyther | f3a317c | 2012-11-06 14:44:44 +0100 | [diff] [blame] | 23 | dh --sourcedirectory=openbsc --with autoreconf $@ |
Eric Butler | a73ca05 | 2012-08-14 17:40:58 -0700 | [diff] [blame] | 24 | |
Holger Hans Peter Freyther | 93fda87 | 2012-11-06 19:26:50 +0100 | [diff] [blame] | 25 | # This is needed for debian stable (squeeze) |
| 26 | override_dh_autoreconf: |
| 27 | cd openbsc && autoreconf --install --force |
| 28 | |
Holger Hans Peter Freyther | 65f7427 | 2013-12-12 13:07:47 +0100 | [diff] [blame] | 29 | override_dh_strip: |
| 30 | dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg |
| 31 | dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg |
| 32 | dh_strip -posmocom-ipaccess-utils --dbg-package=osmocom-ipaccess-utils-dbg |
| 33 | dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg |
| 34 | dh_strip -posmocom-sgsn --dbg-package=osmocom-sgsn-dbg |
| 35 | dh_strip -posmocom-gbproxy --dbg-package=osmocom-gbproxy-dbg |
| 36 | dh_strip -posmocom-bsc-nat --dbg-package=osmocom-bsc-nat-dbg |
| 37 | |
Eric Butler | a73ca05 | 2012-08-14 17:40:58 -0700 | [diff] [blame] | 38 | override_dh_auto_configure: |
Holger Hans Peter Freyther | f3a317c | 2012-11-06 14:44:44 +0100 | [diff] [blame] | 39 | echo $(VERSION) > openbsc/.tarball-version |
| 40 | dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc |
Eric Butler | a73ca05 | 2012-08-14 17:40:58 -0700 | [diff] [blame] | 41 | |