blob: 14e8cecc1aa0a1cce84f38850d21e2bfba348de8 [file] [log] [blame]
Harald Welte95f42062010-08-24 15:33:04 +02001#!/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 Butlerf04324a2012-08-14 21:01:20 -070016DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
17DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
18VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
19
Holger Hans Peter Freyther1dc4f972013-12-12 12:50:18 +010020export DEB_BUILD_HARDENING=1
21
Harald Welte95f42062010-08-24 15:33:04 +020022%:
Holger Hans Peter Freythera4d91252012-11-06 14:44:44 +010023 dh --sourcedirectory=openbsc --with autoreconf $@
Eric Butler37074482012-08-14 17:40:58 -070024
Holger Hans Peter Freytherd7b97d42012-11-06 19:26:50 +010025# This is needed for debian stable (squeeze)
26override_dh_autoreconf:
27 cd openbsc && autoreconf --install --force
28
Holger Hans Peter Freyther5cbb44a2013-12-12 13:07:47 +010029override_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 Butler37074482012-08-14 17:40:58 -070038override_dh_auto_configure:
Holger Hans Peter Freythera4d91252012-11-06 14:44:44 +010039 echo $(VERSION) > openbsc/.tarball-version
40 dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc
Eric Butler37074482012-08-14 17:40:58 -070041