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)
This commit is contained in:
Oliver Jowett 2020-08-06 14:06:20 +08:00
parent 48af886e46
commit c8d96acbdc
2 changed files with 38 additions and 2 deletions

8
debian/control vendored
View File

@ -2,7 +2,13 @@ Source: dump1090-fa
Section: embedded
Priority: extra
Maintainer: Oliver Jowett <oliver.jowett@flightaware.com>
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 <!custom> <rtlsdr>,
libbladerf-dev <!custom> <bladerf>,
libhackrf-dev <!custom> <hackrf>,
liblimesuite-dev <!custom> <limesdr>,
libusb-1.0-0-dev <!custom> <rtlsdr> <bladerf> <hackrf> <limesdr>,
pkg-config, dh-systemd, libncurses5-dev
Standards-Version: 3.9.3
Homepage: http://www.flightaware.com/
Vcs-Git: https://github.com/flightaware/dump1090.git

32
debian/rules vendored
View File

@ -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