fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/41068?usp=email )


Change subject: debian: fix empty osmocom-bb-{trxcon,virtphy} packages
......................................................................

debian: fix empty osmocom-bb-{trxcon,virtphy} packages

For each of layer23, trxcon, and virt_phy:

* Configure/build using the top-level Makefile.
* Install into its own DESTDIR (`debian/tmp/$PROJ`).
* Add the respective `*.install` file.

Change-Id: Ieee634f7f643a7599c735a5b77549cf34deb7fb9
Related: OS#6851
---
A debian/osmocom-bb-layer23.install
A debian/osmocom-bb-trxcon.install
A debian/osmocom-bb-virtphy.install
M debian/rules
4 files changed, 12 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/68/41068/1

diff --git a/debian/osmocom-bb-layer23.install 
b/debian/osmocom-bb-layer23.install
new file mode 100644
index 0000000..7a31ca5
--- /dev/null
+++ b/debian/osmocom-bb-layer23.install
@@ -0,0 +1 @@
+layer23/usr/local/bin/* usr/bin
diff --git a/debian/osmocom-bb-trxcon.install b/debian/osmocom-bb-trxcon.install
new file mode 100644
index 0000000..3876e55
--- /dev/null
+++ b/debian/osmocom-bb-trxcon.install
@@ -0,0 +1 @@
+trxcon/usr/local/bin/trxcon usr/bin
diff --git a/debian/osmocom-bb-virtphy.install 
b/debian/osmocom-bb-virtphy.install
new file mode 100644
index 0000000..858e4f0
--- /dev/null
+++ b/debian/osmocom-bb-virtphy.install
@@ -0,0 +1 @@
+virt_phy/usr/local/bin/virtphy usr/bin
diff --git a/debian/rules b/debian/rules
index e4f5cb0..ea20439 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,34 +1,15 @@
 #!/usr/bin/make -f
-DH_ARGS := -D src/host/$$SUBPKG_DIR --with-autoreconf

 %:
-       export SUBPKG=layer23; \
-       export SUBPKG_DIR=layer23; \
-       export SUBPKG_CFG=--with-gapk-io; \
-       dh $@ $(DH_ARGS)
+       dh $@

-       export SUBPKG=trxcon; \
-       export SUBPKG_DIR=trxcon; \
-       dh $@ $(DH_ARGS)
+override_dh_auto_build:
+       $(MAKE) -C src layer23 HOST_CONFARGS="--with-gapk-io"
+       $(MAKE) -C src trxcon
+       $(MAKE) -C src virtphy

-       export SUBPKG=virtphy; \
-       export SUBPKG_DIR=virt_phy; \
-       dh $@ $(DH_ARGS)
+# Installs a sub-project from src/host/ to its own DESTDIR
+install-%: src/host/%
+       $(MAKE) -C "$^" DESTDIR="$(CURDIR)/debian/tmp/$*" install

-# 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/$$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
+override_dh_auto_install: install-layer23 install-trxcon install-virt_phy

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/41068?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ieee634f7f643a7599c735a5b77549cf34deb7fb9
Gerrit-Change-Number: 41068
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to