From 010ba8515395c8b1ed77488d9035a9e395b8cd02 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Jul 29 2019 13:52:39 +0000 Subject: Disable wireshark dissector subpackage --- diff --git a/openambit.spec b/openambit.spec index 3cc484c..e15a1a0 100644 --- a/openambit.spec +++ b/openambit.spec @@ -23,10 +23,13 @@ BuildRequires: make BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel BuildRequires: systemd-devel -BuildRequires: wireshark-devel BuildRequires: hidapi-devel BuildRequires: python3 BuildRequires: zlib-devel +%if 0%{?with_wireshark:1} +BuildRequires: wireshark-devel +%endif + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: hicolor-icon-theme @@ -55,6 +58,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%if 0%{?with_wireshark:1} %package wireshark Summary: Wireshark dissector for %{name} Requires: wireshark%{?_isa} >= 1.12.6-3 @@ -63,6 +67,7 @@ License: BSD %description wireshark The %{name}-wireshark package contains the Wireshark dissector for %{name}, which parses pcap-files made with usbpcap. +%endif %prep @@ -78,8 +83,12 @@ rm -rf src/libambit/hidapi %build %cmake \ -DCMAKE_INSTALL_UDEVRULESDIR=%{_udevrulesdir} \ + -DUSE_QT5=ON \ +%if 0%{?with_wireshark} + -DBUILD_EXTRAS=ON \ -DCMAKE_INSTALL_WIRESHARKPLUGINSDIR=%{_libdir}/wireshark/plugins/ \ - -DUSE_QT5=ON -DBUILD_EXTRAS=ON . +%endif + . %install @@ -111,9 +120,11 @@ rm -rf src/libambit/hidapi %{_libdir}/libambit.so %{_libdir}/libmovescount.so +%if 0%{?with_wireshark:1} %files wireshark %license wireshark_dissector/COPYING %{_libdir}/wireshark/plugins/ambit.so +%endif %changelog