From f79ebaa2c9c5d11e6d01fc04c564dee128643643 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 15 May 2016 00:08:04 +0200 Subject: [PATCH] debian/{control,rules}: Build with -DCHANNEL_URBDRC_CLIENT=ON and -DCHANNEL_URBDRC=ON only on Linux OSes. --- debian/control | 4 ++-- debian/rules | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index b24219c..a476078 100644 --- a/debian/control +++ b/debian/control @@ -34,8 +34,8 @@ Build-Depends: libavutil-dev, libjpeg-dev, libgsm1-dev, - libusb-1.0-0-dev, - libudev-dev, + libusb-1.0-0-dev [linux-any], + libudev-dev [linux-any], libdbus-glib-1-dev, uuid-dev, libgstreamer1.0-dev, diff --git a/debian/rules b/debian/rules index 03cb1b0..f5e1d28 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,17 @@ endif NULL = +DEB_HOST_ARCH_OS=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS))) +LINUX_URBDRC_CLIENT = -DCHANNEL_URBDRC=ON \ + -DCHANNEL_URBDRC_CLIENT=ON \ + $(NULL) +else +LINUX_URBDRC_CLIENT = -DCHANNEL_URBDRC=OFF \ + -DCHANNEL_URBDRC_CLIENT=OFF \ + $(NULL) +endif + DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_INSTALL_INCLUDEDIR=include/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) \ -DCMAKE_SKIP_RPATH=FALSE \ -DCMAKE_SKIP_INSTALL_RPATH=TRUE \ @@ -27,8 +38,7 @@ DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_INSTALL_INCLUDEDIR=include/$(shell dpkg-archit -DWITH_GSTREAMER_0_10=OFF \ -DWITH_GSTREAMER_1_0=ON \ -DWITH_GSM=ON \ - -DCHANNEL_URBDRC=ON \ - -DCHANNEL_URBDRC_CLIENT=ON \ + $(LINUX_URBDRC_CLIENT) \ -DWITH_SERVER=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \