Add option to disable qt4 support

This commit is contained in:
Merlin Mathesius 2017-10-24 10:26:03 -05:00
parent 64b07e2fc1
commit f7f82bea7c

View File

@ -2,6 +2,7 @@
%{?!WITH_COMPAT_DNSSD: %global WITH_COMPAT_DNSSD 1}
%{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1}
%{?!WITH_QT3: %global WITH_QT3 1}
%{?!WITH_QT4: %global WITH_QT4 1}
%ifnarch %{mono_arches}
%define WITH_MONO 0
@ -9,6 +10,9 @@
%if 0%{?rhel} && 0%{?rhel} <= 7
%define WITH_MONO 0
%endif
%if 0%{?rhel} && 0%{?rhel} >= 6
%define WITH_QT4 0
%endif
# http://bugzilla.redhat.com/1008395 - no hardened build
%global _hardened_build 1
@ -18,7 +22,7 @@
Name: avahi
Version: 0.7
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Local network service discovery
License: LGPLv2+
URL: http://avahi.org
@ -42,7 +46,9 @@ BuildRequires: gtk3-devel >= 2.99.0
%if %{WITH_QT3}
BuildRequires: qt3-devel
%endif
%if %{WITH_QT4}
BuildRequires: qt4-devel
%endif
BuildRequires: libdaemon-devel >= 0.11
BuildRequires: glib2-devel
BuildRequires: libcap-devel
@ -190,6 +196,7 @@ The avahi-qt3-devel package contains the header files and libraries
necessary for developing programs using avahi with Qt3.
%endif
%if %{WITH_QT4}
%package qt4
Summary: Qt4 libraries for avahi
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -205,6 +212,7 @@ Requires: %{name}-qt4%{?_isa} = %{version}-%{release}
%description qt4-devel
Th avahi-qt4-devel package contains the header files and libraries
necessary for developing programs using avahi with Qt4.
%endif
%if %{WITH_MONO}
%package sharp
@ -367,6 +375,9 @@ NOCONFIGURE=1 ./autogen.sh
%if ! %{WITH_QT3}
--disable-qt3 \
%endif
%if ! %{WITH_QT4}
--disable-qt4 \
%endif
%if ! %{WITH_MONO}
--disable-mono \
%endif
@ -478,8 +489,10 @@ exit 0
%postun qt3 -p /sbin/ldconfig
%endif
%if %{WITH_QT4}
%post qt4 -p /sbin/ldconfig
%postun qt4 -p /sbin/ldconfig
%endif
%post ui -p /sbin/ldconfig
%postun ui -p /sbin/ldconfig
@ -606,6 +619,7 @@ exit 0
%{_libdir}/pkgconfig/avahi-qt3.pc
%endif
%if %{WITH_QT4}
%files qt4
%{_libdir}/libavahi-qt4.so.*
@ -613,6 +627,7 @@ exit 0
%{_libdir}/libavahi-qt4.so
%{_includedir}/avahi-qt4/
%{_libdir}/pkgconfig/avahi-qt4.pc
%endif
%if %{WITH_MONO}
%files sharp
@ -661,6 +676,9 @@ exit 0
%changelog
* Tue Oct 24 2017 Merlin Mathesius <mmathesi@redhat.com> - 0.7-6
- Add option to disable qt4 support
* Sat Oct 07 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.7-5
- consistently use %%{_unitdir} macro