[packages/snapd-glib] - updated to 1.65; now supports qt6, but library name is the same, conflicting with qt5 and only one

qboosh qboosh at pld-linux.org
Mon Apr 29 21:49:48 CEST 2024


commit 5aef876560c0f4e3aa365af30ebfebac4972b2d9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 29 21:41:19 2024 +0200

    - updated to 1.65; now supports qt6, but library name is the same, conflicting with qt5 and only one can be built

 snapd-glib.spec | 371 ++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 264 insertions(+), 107 deletions(-)
---
diff --git a/snapd-glib.spec b/snapd-glib.spec
index f22014f..995b1d6 100644
--- a/snapd-glib.spec
+++ b/snapd-glib.spec
@@ -3,27 +3,32 @@
 %bcond_without	apidocs		# API documentation
 %bcond_without	libsoup2	# libsoup 2.x based libraries (snapd-glib, snapd-qt5)
 %bcond_without	libsoup3	# libsoup 3.x based libraries (snapd-glib-2, snapd-qt5-2)
-%bcond_without	qt		# Qt/Qml bindings
+%bcond_without	qt5		# Qt5/Qml bindings
+%bcond_with	qt6		# Qt6/Qml bindings
 %bcond_without	static_libs	# static libraries
 #
+%if %{with qt6}
+# mutually exclusive, library names are the same
+%undefine	with_qt5
+%endif
 Summary:	Library to allow GLib based applications access to snapd
 Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na GLibie 
 Name:		snapd-glib
-Version:	1.64
+Version:	1.65
 Release:	1
 License:	LGPL v2 or LGPL v3
 Group:		Libraries
 #Source0Download: https://github.com/snapcore/snapd-glib/releases
 Source0:	https://github.com/snapcore/snapd-glib/releases/download/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	188526f02727bf4ae339be5eb7c53048
+# Source0-md5:	4986061f3fd4bc71d1709a1ffcd1427e
 URL:		https://github.com/snapcore/snapd-glib
-BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	glib2-devel >= 1:2.46
 BuildRequires:	gobject-introspection-devel
 BuildRequires:	json-glib-devel >= 1.1.2
 %{?with_libsoup2:BuildRequires:	libsoup-devel >= 2.32}
 %{?with_libsoup3:BuildRequires:	libsoup3-devel >= 3.0}
-BuildRequires:	meson >= 0.43.0
+BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	meson >= 0.58.0
 BuildRequires:	ninja >= 1.5
 BuildRequires:	pkgconfig
 BuildRequires:	rpm-build >= 4.6
@@ -31,11 +36,17 @@ BuildRequires:	rpmbuild(macros) >= 1.736
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	vala
 BuildRequires:	xz
-%if %{with qt}
-BuildRequires:	Qt5Core-devel >= 5
-BuildRequires:	Qt5Network-devel >= 5
-BuildRequires:	Qt5Qml-devel >= 5
-BuildRequires:	qt5-build >= 5
+%if %{with qt5}
+BuildRequires:	Qt5Core-devel >= 5.9.5
+BuildRequires:	Qt5Network-devel >= 5.9.5
+BuildRequires:	Qt5Qml-devel >= 5.9.5
+BuildRequires:	qt5-build >= 5.9.5
+%endif
+%if %{with qt6}
+BuildRequires:	Qt6Core-devel >= 6.2.4
+BuildRequires:	Qt6Network-devel >= 6.2.4
+BuildRequires:	Qt6Qml-devel >= 6.2.4
+BuildRequires:	qt6-build >= 6.2.4
 %endif
 Requires:	glib2 >= 1:2.46
 Requires:	json-glib >= 1.1.2
@@ -91,59 +102,6 @@ Vala API for snapd-glib library.
 %description -n vala-snapd-glib -l pl.UTF-8
 API języka Vala do biblioteki snapd-glib.
 
-%package -n snapd-qt5
-Summary:	Library to allow Qt 5 based applications access to snapd
-Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na Qt 5
-Group:		Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description -n snapd-qt5
-snapd-qt is a library to allow Qt based applications access to snapd,
-the daemon that controls Snaps.
-
-%description -n snapd-qt5 -l pl.UTF-8
-snapd-qt to biblioteka pozwalająca na dostęp aplikacji opartych na Qt
-do snapd - demona kontrolującego Snapy.
-
-%package -n snapd-qt5-devel
-Summary:	Header files for snapd-qt library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki snapd-qt
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-Requires:	Qt5Core-devel >= 5
-Requires:	Qt5Network-devel >= 5
-Requires:	snapd-qt5-devel = %{version}-%{release}
-
-%description -n snapd-qt5-devel
-Header files for snapd-qt library.
-
-%description -n snapd-qt5-devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki snapd-qt.
-
-%package -n snapd-qt5-static
-Summary:	Static snapd-qt library
-Summary(pl.UTF-8):	Statyczna biblioteka snapd-qt
-Group:		Development/Libraries
-Requires:	snapd-qt5-devel = %{version}-%{release}
-
-%description -n snapd-qt5-static
-Static snapd-qt library.
-
-%description -n snapd-qt5-static -l pl.UTF-8
-Statyczna biblioteka snapd-qt.
-
-%package apidocs
-Summary:	API documentation for snapd-glib library
-Summary(pl.UTF-8):	Dokumentacja API biblioteki snapd-glib
-Group:		Documentation
-BuildArch:	noarch
-
-%description apidocs
-API documentation for snapd-glib library.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API biblioteki snapd-glib.
-
 %package 2
 Summary:	Library to allow GLib based applications access to snapd using libsoup3
 Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd przy użyciu libsoup3 aplikacjom opartym na GLibie
@@ -201,11 +159,68 @@ Vala API for snapd-glib-2 library.
 %description -n vala-snapd-glib-2 -l pl.UTF-8
 API języka Vala do biblioteki snapd-glib-2.
 
+%package apidocs
+Summary:	API documentation for snapd-glib library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki snapd-glib
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for snapd-glib library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki snapd-glib.
+
+%package -n snapd-qt5
+Summary:	Library to allow Qt 5 based applications access to snapd
+Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na Qt 5
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	Qt5Core >= 5.9.5
+Requires:	Qt5Network >= 5.9.5
+
+%description -n snapd-qt5
+snapd-qt is a library to allow Qt based applications access to snapd,
+the daemon that controls Snaps.
+
+%description -n snapd-qt5 -l pl.UTF-8
+snapd-qt to biblioteka pozwalająca na dostęp aplikacji opartych na Qt
+do snapd - demona kontrolującego Snapy.
+
+%package -n snapd-qt5-devel
+Summary:	Header files for snapd-qt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki snapd-qt
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	Qt5Core-devel >= 5.9.5
+Requires:	Qt5Network-devel >= 5.9.5
+Requires:	snapd-qt5-devel = %{version}-%{release}
+
+%description -n snapd-qt5-devel
+Header files for snapd-qt library.
+
+%description -n snapd-qt5-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki snapd-qt.
+
+%package -n snapd-qt5-static
+Summary:	Static snapd-qt library
+Summary(pl.UTF-8):	Statyczna biblioteka snapd-qt
+Group:		Development/Libraries
+Requires:	snapd-qt5-devel = %{version}-%{release}
+
+%description -n snapd-qt5-static
+Static snapd-qt library.
+
+%description -n snapd-qt5-static -l pl.UTF-8
+Statyczna biblioteka snapd-qt.
+
 %package -n snapd-qt5-2
 Summary:	Library to allow Qt 5 based applications access to snapd using libsoup3
 Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na Qt 5 przy użyciu libsoup3
 Group:		Libraries
 Requires:	%{name}-2 = %{version}-%{release}
+Requires:	Qt5Core >= 5.9.5
+Requires:	Qt5Network >= 5.9.5
 
 %description -n snapd-qt5-2
 snapd-qt-2 is a library to allow Qt based applications access to
@@ -220,8 +235,8 @@ Summary:	Header files for snapd-qt-2 library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki snapd-qt-2
 Group:		Development/Libraries
 Requires:	%{name}-2-devel = %{version}-%{release}
-Requires:	Qt5Core-devel >= 5
-Requires:	Qt5Network-devel >= 5
+Requires:	Qt5Core-devel >= 5.9.5
+Requires:	Qt5Network-devel >= 5.9.5
 Requires:	snapd-qt5-2-devel = %{version}-%{release}
 
 %description -n snapd-qt5-2-devel
@@ -242,29 +257,115 @@ Static snapd-qt-2 library.
 %description -n snapd-qt5-2-static -l pl.UTF-8
 Statyczna biblioteka snapd-qt-2.
 
+%package -n snapd-qt6
+Summary:	Library to allow Qt 6 based applications access to snapd
+Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na Qt 6
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	Qt6Core >= 6.2.4
+Requires:	Qt6Network >= 6.2.4
+
+%description -n snapd-qt6
+snapd-qt is a library to allow Qt based applications access to snapd,
+the daemon that controls Snaps.
+
+%description -n snapd-qt6 -l pl.UTF-8
+snapd-qt to biblioteka pozwalająca na dostęp aplikacji opartych na Qt
+do snapd - demona kontrolującego Snapy.
+
+%package -n snapd-qt6-devel
+Summary:	Header files for snapd-qt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki snapd-qt
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	Qt6Core-devel >= 6.2.4
+Requires:	Qt6Network-devel >= 6.2.4
+Requires:	snapd-qt6-devel = %{version}-%{release}
+
+%description -n snapd-qt6-devel
+Header files for snapd-qt library.
+
+%description -n snapd-qt6-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki snapd-qt.
+
+%package -n snapd-qt6-static
+Summary:	Static snapd-qt library
+Summary(pl.UTF-8):	Statyczna biblioteka snapd-qt
+Group:		Development/Libraries
+Requires:	snapd-qt6-devel = %{version}-%{release}
+
+%description -n snapd-qt6-static
+Static snapd-qt library.
+
+%description -n snapd-qt6-static -l pl.UTF-8
+Statyczna biblioteka snapd-qt.
+
+%package -n snapd-qt6-2
+Summary:	Library to allow Qt 6 based applications access to snapd using libsoup3
+Summary(pl.UTF-8):	Biblioteka umożliwiająca dostęp do snapd aplikacjom opartym na Qt 6 przy użyciu libsoup3
+Group:		Libraries
+Requires:	%{name}-2 = %{version}-%{release}
+Requires:	Qt6Core >= 6.2.4
+Requires:	Qt6Network >= 6.2.4
+
+%description -n snapd-qt6-2
+snapd-qt-2 is a library to allow Qt based applications access to
+snapd, the daemon that controls Snaps.
+
+%description -n snapd-qt6-2 -l pl.UTF-8
+snapd-qt-2 to biblioteka pozwalająca na dostęp aplikacji opartych na
+Qt do snapd - demona kontrolującego Snapy.
+
+%package -n snapd-qt6-2-devel
+Summary:	Header files for snapd-qt-2 library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki snapd-qt-2
+Group:		Development/Libraries
+Requires:	%{name}-2-devel = %{version}-%{release}
+Requires:	Qt6Core-devel >= 6.2.4
+Requires:	Qt6Network-devel >= 6.2.4
+Requires:	snapd-qt6-2-devel = %{version}-%{release}
+
+%description -n snapd-qt6-2-devel
+Header files for snapd-qt-2 library.
+
+%description -n snapd-qt6-2-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki snapd-qt-2.
+
+%package -n snapd-qt6-2-static
+Summary:	Static snapd-qt-2 library
+Summary(pl.UTF-8):	Statyczna biblioteka snapd-qt-2
+Group:		Development/Libraries
+Requires:	snapd-qt6-2-devel = %{version}-%{release}
+
+%description -n snapd-qt6-2-static
+Static snapd-qt-2 library.
+
+%description -n snapd-qt6-2-static -l pl.UTF-8
+Statyczna biblioteka snapd-qt-2.
+
 %prep
 %setup -q
 
 %build
-for kind in %{?with_libsoup2:soup2} %{?with_libsoup3:soup3} ; do
-%meson build-${kind} \
+for soupkind in %{?with_libsoup2:soup2} %{?with_libsoup3:soup3} ; do
+%meson build-${soupkind} \
 	%{!?with_static_libs:--default-library=shared} \
 	%{!?with_apidocs:-Ddocs=false} \
-	%{!?with_qt:-Dqml-bindings=false} \
-	%{!?with_qt:-Dqt-bindings=false} \
-	$([ "$kind" = "soup2" ] && echo -Dsoup2=true)
+	%{?with_qt5:-Dqt5=true} \
+	%{!?with_qt6:-Dqt6=false} \
+	$([ "$soupkind" = "soup2" ] && echo -Dsoup2=true)
 
-%ninja_build -C build-${kind}
+%ninja_build -C build-${soupkind}
 done
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-for kind in %{?with_libsoup2:soup2} %{?with_libsoup3:soup3} ; do
-%ninja_install -C build-${kind}
+for soupkind in %{?with_libsoup2:soup2} %{?with_libsoup3:soup3} ; do
+%ninja_install -C build-${soupkind}
 done
 
-%if %{with qt} && %{with static_libs}
+%if (%{with qt5} || %{with qt6}) && %{with static_libs}
 %if %{with libsoup2}
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/qt5/qml/Snapd/libSnapd.a
 %endif
@@ -281,15 +382,21 @@ rm -rf $RPM_BUILD_ROOT
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
-%post	-n snapd-qt5 -p /sbin/ldconfig
-%postun	-n snapd-qt5 -p /sbin/ldconfig
-
 %post	2 -p /sbin/ldconfig
 %postun	2 -p /sbin/ldconfig
 
+%post	-n snapd-qt5 -p /sbin/ldconfig
+%postun	-n snapd-qt5 -p /sbin/ldconfig
+
 %post	-n snapd-qt5-2 -p /sbin/ldconfig
 %postun	-n snapd-qt5-2 -p /sbin/ldconfig
 
+%post	-n snapd-qt6 -p /sbin/ldconfig
+%postun	-n snapd-qt6 -p /sbin/ldconfig
+
+%post	-n snapd-qt6-2 -p /sbin/ldconfig
+%postun	-n snapd-qt6-2 -p /sbin/ldconfig
+
 %if %{with libsoup2}
 %files
 %defattr(644,root,root,755)
@@ -315,35 +422,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_datadir}/vala/vapi/snapd-glib.deps
 %{_datadir}/vala/vapi/snapd-glib.vapi
-
-%if %{with qt}
-%files -n snapd-qt5
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsnapd-qt.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsnapd-qt.so.1
-%dir %{_libdir}/qt5/qml/Snapd
-%attr(755,root,root) %{_libdir}/qt5/qml/Snapd/libSnapd.so
-%{_libdir}/qt5/qml/Snapd/qmldir
-
-%files -n snapd-qt5-devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsnapd-qt.so
-%{_includedir}/snapd-qt
-%{_pkgconfigdir}/snapd-qt.pc
-%{_libdir}/cmake/Snapd
-
-%if %{with static_libs}
-%files -n snapd-qt5-static
-%defattr(644,root,root,755)
-%{_libdir}/libsnapd-qt.a
-%endif
-%endif
-%endif
-
-%if %{with apidocs}
-%files apidocs
-%defattr(644,root,root,755)
-%{_gtkdocdir}/snapd-glib
 %endif
 
 %if %{with libsoup3}
@@ -371,8 +449,39 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_datadir}/vala/vapi/snapd-glib-2.deps
 %{_datadir}/vala/vapi/snapd-glib-2.vapi
+%endif
 
-%if %{with qt}
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/snapd-glib
+%endif
+
+%if %{with qt5}
+%if %{with libsoup2}
+%files -n snapd-qt5
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsnapd-qt.so.1
+%dir %{_libdir}/qt5/qml/Snapd
+%attr(755,root,root) %{_libdir}/qt5/qml/Snapd/libSnapd.so
+%{_libdir}/qt5/qml/Snapd/qmldir
+
+%files -n snapd-qt5-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt.so
+%{_includedir}/snapd-qt
+%{_pkgconfigdir}/snapd-qt.pc
+%{_libdir}/cmake/Snapd
+
+%if %{with static_libs}
+%files -n snapd-qt5-static
+%defattr(644,root,root,755)
+%{_libdir}/libsnapd-qt.a
+%endif
+%endif
+
+%if %{with libsoup3}
 %files -n snapd-qt5-2
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libsnapd-qt-2.so.*.*.*
@@ -395,3 +504,51 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %endif
 %endif
+
+%if %{with qt6}
+%if %{with libsoup2}
+%files -n snapd-qt6
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsnapd-qt.so.1
+%dir %{_libdir}/qt6/qml/Snapd
+%attr(755,root,root) %{_libdir}/qt6/qml/Snapd/libSnapd.so
+%{_libdir}/qt6/qml/Snapd/qmldir
+
+%files -n snapd-qt6-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt.so
+%{_includedir}/snapd-qt
+%{_pkgconfigdir}/snapd-qt.pc
+%{_libdir}/cmake/Snapd
+
+%if %{with static_libs}
+%files -n snapd-qt6-static
+%defattr(644,root,root,755)
+%{_libdir}/libsnapd-qt.a
+%endif
+%endif
+
+%if %{with libsoup3}
+%files -n snapd-qt6-2
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt-2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsnapd-qt-2.so.1
+%dir %{_libdir}/qt6/qml/Snapd2
+%attr(755,root,root) %{_libdir}/qt6/qml/Snapd2/libSnapd2.so
+%{_libdir}/qt6/qml/Snapd2/qmldir
+
+%files -n snapd-qt6-2-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsnapd-qt-2.so
+%{_includedir}/snapd-qt-2
+%{_pkgconfigdir}/snapd-qt-2.pc
+%{_libdir}/cmake/Snapd2
+
+%if %{with static_libs}
+%files -n snapd-qt6-2-static
+%defattr(644,root,root,755)
+%{_libdir}/libsnapd-qt-2.a
+%endif
+%endif
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/snapd-glib.git/commitdiff/5aef876560c0f4e3aa365af30ebfebac4972b2d9



More information about the pld-cvs-commit mailing list