osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/38999?usp=email )
Change subject: debian: prepare for more subpackages ......................................................................
debian: prepare for more subpackages
Prepare to add these subpackages in follow-up patches: * osmocom-bb-trx-toolkit * osmocom-bb-trxcon * osmocom-bb-virtphy
We need these components to run some of the ttnc3 testsuites. By having them packaged, we can just install them from the binary repositories along with the SUT.
trxcon and virtphy are autootols based, so rework debian/rules to support building multiple autotools projects.
Related: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38851/1..2//COMMIT_MSG#b9 Change-Id: I77ad988f5405e6fa9e585eeb646e513ac7d92485 --- M debian/rules 1 file changed, 21 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/debian/rules b/debian/rules index 8dd0df8..df0520e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,26 @@ #!/usr/bin/make -f +DH_ARGS := -D src/host/$$SUBPKG_DIR --with-autoreconf
%: - dh $@ -D src/host/layer23 --with-autoreconf + export SUBPKG=layer23; \ + export SUBPKG_DIR=layer23; \ + export SUBPKG_CFG=--with-gapk-io; \ + dh $@ $(DH_ARGS) + +# We need to run autoreconf multiple times, but dh_autoreconf can only run once +# (see dh-autoreconf(7)). Run autoreconf directly to work around this. +override_dh_autoreconf: + cd src/host/$$SUBPKG_DIR && autoreconf -fi
override_dh_auto_configure: - dh_auto_configure -D src/host/layer23 -- --with-gapk-io + dh_auto_configure -D src/host/$$SUBPKG_DIR -- $$SUBPKG_CFG + +override_dh_auto_install: + dh_auto_install -O-Dsrc/host/$$SUBPKG_DIR --destdir=debian/osmocom-bb-$$SUBPKG/ + +# Run dh_prep only for the first subpackage. Otherwise previously built +# binaries get removed and we end up with empty packages. +override_dh_prep: + if [ "$$SUBPKG" = "layer23" ]; then \ + dh_prep; \ + fi