From c8d96acbdc5b1a98be04bec136d0ee4d757630c7 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 6 Aug 2020 14:06:20 +0800 Subject: [PATCH] Add support for custom builds that don't include all SDRs, to reduce dependency requirements a little. (Ideally we'd have some sort of module system here, and split the dependencies out nicely into separate packages, but that's a problem for other day; for now I can live with custom packages having the same name as the full build, since we'll never distribute them ourselves) --- debian/control | 8 +++++++- debian/rules | 32 +++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 347c79b..92d02ab 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,13 @@ Source: dump1090-fa Section: embedded Priority: extra Maintainer: Oliver Jowett -Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev, libhackrf-dev, liblimesuite-dev +Build-Depends: debhelper(>=9), + librtlsdr-dev , + libbladerf-dev , + libhackrf-dev , + liblimesuite-dev , + libusb-1.0-0-dev , + pkg-config, dh-systemd, libncurses5-dev Standards-Version: 3.9.3 Homepage: http://www.flightaware.com/ Vcs-Git: https://github.com/flightaware/dump1090.git diff --git a/debian/rules b/debian/rules index 397f173..93f94f8 100755 --- a/debian/rules +++ b/debian/rules @@ -19,8 +19,38 @@ ifeq ($(DEB_HOST_ARCH),armhf) CPPFLAGS += -DSC16Q11_TABLE_BITS=8 endif +ifeq (,$(filter custom,$(DEB_BUILD_PROFILES))) + # Standard build + RTLSDR = yes + BLADERF = yes + HACKRF = yes + LIMESDR = yes +else + # Custom build + ifneq (,$(filter rtlsdr,$(DEB_BUILD_PROFILES))) + RTLSDR = yes + else + RTLSDR = no + endif + ifneq (,$(filter bladerf,$(DEB_BUILD_PROFILES))) + BLADERF = yes + else + BLADERF = no + endif + ifneq (,$(filter hackrf,$(DEB_BUILD_PROFILES))) + HACKRF = yes + else + HACKRF = no + endif + ifneq (,$(filter limesdr,$(DEB_BUILD_PROFILES))) + LIMESDR = yes + else + LIMESDR = no + endif +endif + override_dh_auto_build: - dh_auto_build -- RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=$(DEB_VERSION) + dh_auto_build -- RTLSDR=$(RTLSDR) BLADERF=$(BLADERF) HACKRF=$(HACKRF) LIMESDR=$(LIMESDR) DUMP1090_VERSION=$(DEB_VERSION) override_dh_install: dh_install