Make possible to bootstrap build w/o GTK and Qt5

This commit is contained in:
Michal Sekletar 2020-09-07 09:31:44 +00:00
parent 2500cac704
commit 178fd0a306

View File

@ -1,9 +1,22 @@
%bcond_with bootstrap
%if %{without bootstrap}
%{?!WITH_MONO: %global WITH_MONO 1} %{?!WITH_MONO: %global WITH_MONO 1}
%else
%{?!WITH_MONO: %global WITH_MONO 0}
%endif
%{?!WITH_COMPAT_DNSSD: %global WITH_COMPAT_DNSSD 1} %{?!WITH_COMPAT_DNSSD: %global WITH_COMPAT_DNSSD 1}
%{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1} %{?!WITH_COMPAT_HOWL: %global WITH_COMPAT_HOWL 1}
%{?!WITH_QT3: %global WITH_QT3 1} %{?!WITH_QT3: %global WITH_QT3 1}
%{?!WITH_QT4: %global WITH_QT4 1} %{?!WITH_QT4: %global WITH_QT4 1}
%if %{without bootstrap}
%{?!WITH_QT5: %global WITH_QT5 1} %{?!WITH_QT5: %global WITH_QT5 1}
%else
%{?!WITH_QT5: %global WITH_QT5 0}
%endif
%{?!WITH_PYTHON: %global WITH_PYTHON 1} %{?!WITH_PYTHON: %global WITH_PYTHON 1}
%ifnarch %{mono_arches} %ifnarch %{mono_arches}
@ -51,8 +64,10 @@ BuildRequires: libtool
BuildRequires: dbus-devel >= 0.90 BuildRequires: dbus-devel >= 0.90
BuildRequires: dbus-glib-devel >= 0.70 BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
%if %{without bootstrap}
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: gtk3-devel >= 2.99.0 BuildRequires: gtk3-devel >= 2.99.0
%endif
#BuildRequires: gobject-introspection-devel #BuildRequires: gobject-introspection-devel
%if %{WITH_QT3} %if %{WITH_QT3}
BuildRequires: qt3-devel BuildRequires: qt3-devel
@ -84,8 +99,10 @@ BuildRequires: python3-devel
Obsoletes: python2-avahi < %{version}-%{release} Obsoletes: python2-avahi < %{version}-%{release}
Obsoletes: python3-avahi < %{version}-%{release} Obsoletes: python3-avahi < %{version}-%{release}
Obsoletes: avahi-ui-tools < %{version}-%{release} Obsoletes: avahi-ui-tools < %{version}-%{release}
%if %{without bootstrap}
BuildRequires: pygtk2 BuildRequires: pygtk2
%endif %endif
%endif
BuildRequires: gdbm-devel BuildRequires: gdbm-devel
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: pkgconfig(libevent) >= 2.0.21 BuildRequires: pkgconfig(libevent) >= 2.0.21
@ -191,6 +208,7 @@ Requires: %{name}-gobject%{?_isa} = %{version}-%{release}
The avahi-gobject-devel package contains the header files and libraries The avahi-gobject-devel package contains the header files and libraries
necessary for developing programs using avahi-gobject. necessary for developing programs using avahi-gobject.
%if %{without bootstrap}
%package ui %package ui
Summary: Gtk user interface library for Avahi (Gtk+ 2 version) Summary: Gtk user interface library for Avahi (Gtk+ 2 version)
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -219,6 +237,7 @@ Requires: %{name}-ui-gtk3%{?_isa} = %{version}-%{release}
%description ui-devel %description ui-devel
The avahi-ui-devel package contains the header files and libraries The avahi-ui-devel package contains the header files and libraries
necessary for developing programs using avahi-ui. necessary for developing programs using avahi-ui.
%endif
%if %{WITH_QT3} %if %{WITH_QT3}
%package qt3 %package qt3
@ -431,7 +450,12 @@ NOCONFIGURE=1 ./autogen.sh
--enable-shared=yes \ --enable-shared=yes \
--enable-static=no \ --enable-static=no \
--disable-silent-rules \ --disable-silent-rules \
%if %{without bootstrap}
--enable-gtk \ --enable-gtk \
%else
--disable-gtk \
--disable-gtk3 \
%endif
%if ! %{WITH_PYTHON} %if ! %{WITH_PYTHON}
--disable-python \ --disable-python \
%endif %endif
@ -684,6 +708,7 @@ exit 0
#%{_datadir}/gir-1.0/Avahi-0.6.gir #%{_datadir}/gir-1.0/Avahi-0.6.gir
#%{_datadir}/gir-1.0/AvahiCore-0.6.gir #%{_datadir}/gir-1.0/AvahiCore-0.6.gir
%if %{without bootstrap}
%files ui %files ui
%{_libdir}/libavahi-ui.so.* %{_libdir}/libavahi-ui.so.*
@ -696,6 +721,7 @@ exit 0
%{_includedir}/avahi-ui %{_includedir}/avahi-ui
%{_libdir}/pkgconfig/avahi-ui.pc %{_libdir}/pkgconfig/avahi-ui.pc
%{_libdir}/pkgconfig/avahi-ui-gtk3.pc %{_libdir}/pkgconfig/avahi-ui-gtk3.pc
%endif
%if %{WITH_QT3} %if %{WITH_QT3}
%ldconfig_scriptlets qt3 %ldconfig_scriptlets qt3