Source: ubertooth
Version: 2017.03.R2-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

ubertooth Build-Depends on pretty heavy arm-none-eabi packages that are
not actually required for an indep-only build. They can be demoted to
Build-Depends-Indep relatively easily as the attached patch
demonstrates. This is beneficial to cross building, because those
dependencies happen to be unsatisfiable for cross builds. Please
consider applying the attached patch. I verified (with reproducible
builds) that it doesn't change the arch-any build (modulo build ids).

Helmut
diff --minimal -Nru ubertooth-2017.03.R2/debian/changelog 
ubertooth-2017.03.R2/debian/changelog
--- ubertooth-2017.03.R2/debian/changelog       2017-07-16 20:40:08.000000000 
+0200
+++ ubertooth-2017.03.R2/debian/changelog       2018-03-23 17:43:51.000000000 
+0100
@@ -1,3 +1,10 @@
+ubertooth (2017.03.R2-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Demote firmware dependencies to Build-Depends-Indep. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 23 Mar 2018 17:43:51 +0100
+
 ubertooth (2017.03.R2-2) unstable; urgency=low
 
   * debian/control:
diff --minimal -Nru ubertooth-2017.03.R2/debian/control 
ubertooth-2017.03.R2/debian/control
--- ubertooth-2017.03.R2/debian/control 2017-07-16 20:40:08.000000000 +0200
+++ ubertooth-2017.03.R2/debian/control 2018-03-23 17:41:29.000000000 +0100
@@ -11,10 +11,10 @@
                libbluetooth-dev,
                libbtbb-dev (>= 2017.03.R2),
                python-all-dev,
-               txt2man,
-               gcc-arm-none-eabi,
-               libnewlib-arm-none-eabi,
-               libstdc++-arm-none-eabi-newlib
+               txt2man
+Build-Depends-Indep: gcc-arm-none-eabi,
+                     libnewlib-arm-none-eabi,
+                     libstdc++-arm-none-eabi-newlib
 Standards-Version: 4.0.0
 Vcs-Browser: https://github.com/rubund/debian-ubertooth/tree/master
 Vcs-Git: https://github.com/rubund/debian-ubertooth.git
diff --minimal -Nru ubertooth-2017.03.R2/debian/rules 
ubertooth-2017.03.R2/debian/rules
--- ubertooth-2017.03.R2/debian/rules   2017-03-15 14:24:13.000000000 +0100
+++ ubertooth-2017.03.R2/debian/rules   2018-03-23 17:43:51.000000000 +0100
@@ -10,6 +10,7 @@
 SOURCE_DATE ?= $(shell dpkg-parsechangelog --show-field Date)
 SOURCE_DATE_UTC ?= $(shell LC_ALL=C date -u -d "$(SOURCE_DATE)")
 CHANGELOG_DATE ?= $(shell LC_ALL=C date -u -d "$(SOURCE_DATE)" +"%d %B %Y")
+DOPACKAGES = $(shell dh_listpackages)
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
@@ -38,19 +39,25 @@
        
        dh_auto_configure --sourcedirectory=host -- 
-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
          -DUBERTOOTH_GROUP=plugdev -DUDEV_RULES_PATH=/lib/udev/rules.d
+ifneq ($(filter ubertooth-firmware,$(DOPACKAGES)),)
        dh_auto_configure --sourcedirectory=firmware
+endif
 
 override_dh_auto_build:
        dh_auto_build --sourcedirectory=host
+ifneq ($(filter ubertooth-firmware,$(DOPACKAGES)),)
        dh_auto_build --sourcedirectory=firmware -- TIMESTAMP="-DTIMESTAMP=''" \
          COMPILE_BY="-D'COMPILE_BY=\"user\"'" 
COMPILE_HOST="-D'COMPILE_HOST=\"localhost\"'"
+endif
        cat debian/ubertooth.pc.in | sed 
's/DEB_HOST_MULTIARCH/$(DEB_HOST_MULTIARCH)/' | \
          sed 's/UPSTREAM_PACKAGE_VERSION/$(UPSTREAM_PACKAGE_VERSION)/' > 
debian/ubertooth.pc
 
 override_dh_auto_install:
-       chmod a-x firmware/*/*.bin
        dh_auto_install --sourcedirectory=host
+ifneq ($(filter ubertooth-firmware,$(DOPACKAGES)),)
+       chmod a-x firmware/*/*.bin
        dh_auto_install --sourcedirectory=firmware
+endif
        mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
        cp debian/ubertooth.pc 
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
        rm debian/tmp/usr/bin/ubertooth-tx # The tool does nothing - not fully 
implemented. Skip installing

Reply via email to