From 1578ced83e19ce0b2961a2fe53fd9dcaf92bb2fa Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Wed, 8 Jun 2022 09:37:50 +0000 Subject: [PATCH] Allow building without Qt dependencies Compiling with --without=qt will not pull in Qt dependencies, and will also not produce the -qt subpackages. --- appstream.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/appstream.spec b/appstream.spec index 961f895..c2b4c4b 100644 --- a/appstream.spec +++ b/appstream.spec @@ -5,7 +5,7 @@ Summary: Utilities to generate, maintain and access the AppStream database Name: appstream Version: 0.15.5 -Release: 1%{?dist} +Release: 2%{?dist} # lib LGPLv2+, tools GPLv2+ License: GPLv2+ and LGPLv2+ @@ -13,6 +13,8 @@ License: GPLv2+ and LGPLv2+ URL: https://github.com/ximion/appstream Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz +%bcond qt 1 + ## upstream patches (lookaside cache) ## upstreamable patches @@ -40,11 +42,15 @@ BuildRequires: pkgconfig(lmdb) BuildRequires: pkgconfig(packagekit-glib2) BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(protobuf-lite) +%if %{with qt} BuildRequires: pkgconfig(Qt5Core) +%endif BuildRequires: pkgconfig(xmlb) BuildRequires: pkgconfig(yaml-0.1) # lrelease +%if %{with qt} BuildRequires: qt5-linguist +%endif BuildRequires: sed BuildRequires: vala BuildRequires: xmlto @@ -77,6 +83,7 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description compose-devel %{summary}. +%if %{with qt} %package qt Summary: Qt5 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -89,6 +96,7 @@ Requires: %{name}-qt%{?_isa} = %{version}-%{release} Requires: pkgconfig(Qt5Core) %description qt-devel %{summary}. +%endif %prep @@ -98,7 +106,9 @@ Requires: pkgconfig(Qt5Core) %build %{meson} \ -Dcompose=true \ +%if %{with qt} -Dqt=true \ +%endif -Dvapi=%{?vala:true}%{!?vala:false} %{meson_build} @@ -192,6 +202,7 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \ %dir %{_datadir}/gtk-doc/html/ %{_datadir}/gtk-doc/html/appstream-compose +%if %{with qt} %ldconfig_scriptlets qt %files qt @@ -202,9 +213,13 @@ mv %{buildroot}%{_datadir}/metainfo/*.xml \ %{_includedir}/AppStreamQt/ %{_libdir}/cmake/AppStreamQt/ %{_libdir}/libAppStreamQt.so +%endif %changelog +* Tue Sep 6 2022 Amit Shah - 0.15.5-2 +- Make qt deps and builds conditional + * Fri Sep 02 2022 Rex Dieter - 0.15.5-1 - 0.15.5