[packages/libgweather4] - libgweather 4.0 parallel-installable with libgweather 3.x

qboosh qboosh at pld-linux.org
Wed Mar 30 20:09:37 CEST 2022


commit 50060773a65756024e37053482995a54430a2f05
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 30 20:09:17 2022 +0200

    - libgweather 4.0 parallel-installable with libgweather 3.x

 libgweather.spec => libgweather4.spec | 135 +++++++++++++++++-----------------
 1 file changed, 69 insertions(+), 66 deletions(-)
---
diff --git a/libgweather.spec b/libgweather4.spec
similarity index 56%
rename from libgweather.spec
rename to libgweather4.spec
index 61265a6..50359d1 100644
--- a/libgweather.spec
+++ b/libgweather4.spec
@@ -1,40 +1,48 @@
 #
 # Conditional build:
-%bcond_without	glade	# Glade catalog
-%bcond_without	vala	# Vala API
+%bcond_without	apidocs		# gi-docgen generated API documentation
+%bcond_without	vala		# Vala API
+%bcond_with	libsoup3	# libsoup3 instead of libsoup 2.x (must match geocode-glib)
 
 Summary:	Library to access weather information from online services for numerous locations
 Summary(pl.UTF-8):	Biblioteka dostępu do informacji pogodowych z serwisów internetowych dla różnych miejsc
-Name:		libgweather
-Version:	40.0
-Release:	2
+Name:		libgweather4
+Version:	4.0.0
+Release:	1
 License:	GPL v2+
 Group:		X11/Libraries
-Source0:	https://download.gnome.org/sources/libgweather/40/%{name}-%{version}.tar.xz
-# Source0-md5:	a9c0989890a837982defd8238e1eb356
+Source0:	https://download.gnome.org/sources/libgweather/4.0/libgweather-%{version}.tar.xz
+# Source0-md5:	2aa2708dfde3481c87da3d7ea27110da
 URL:		https://wiki.gnome.org/Projects/LibGWeather
 BuildRequires:	geocode-glib-devel
 BuildRequires:	gettext-tools >= 0.18
-%{?with_glade:BuildRequires:	glade-devel >= 2.0}
-BuildRequires:	glib2-devel >= 1:2.44.0
+%{?with_apidocs:BuildRequires:	gi-docgen >= 2021.6}
+BuildRequires:	glib2-devel >= 1:2.68.0
 BuildRequires:	gobject-introspection-devel >= 0.10.0
-BuildRequires:	gtk+3-devel >= 3.14.0
-BuildRequires:	gtk-doc >= 1.11
+%if %{with libsoup3}
+BuildRequires:	libsoup3-devel >= 3.0.0
+%else
 BuildRequires:	libsoup-devel >= 2.44.0
+%endif
 BuildRequires:	libxml2-devel >= 1:2.6.30
-BuildRequires:	meson >= 0.50.0
+BuildRequires:	meson >= 0.55.0
 BuildRequires:	ninja >= 1.5
 BuildRequires:	pkgconfig >= 1:0.19
+BuildRequires:	python3 >= 1:3
+BuildRequires:	python3-pygobject3 >= 3
 BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.736
 BuildRequires:	tar >= 1:1.22
 %{?with_vala:BuildRequires:	vala >= 2:0.18.0}
 BuildRequires:	xz
 Requires(post,postun):	/sbin/ldconfig
-Requires(post,postun):	glib2 >= 1:2.44.0
-Requires:	glib2 >= 1:2.44.0
-Requires:	gtk+3 >= 3.14.0
+Requires(post,postun):	glib2 >= 1:2.68.0
+Requires:	glib2 >= 1:2.68.0
+%if %{with libsoup3}
+Requires:	libsoup3 >= 3.0.0
+%else
 Requires:	libsoup >= 2.44.0
+%endif
 Requires:	libxml2 >= 1:2.6.30
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -51,12 +59,13 @@ Summary:	Header files for libgweather
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libgweather
 Group:		X11/Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	glib2-devel >= 1:2.44.0
-Requires:	gtk+3-devel >= 3.14.0
+Requires:	glib2-devel >= 1:2.68.0
+%if %{with libsoup3}
+Requires:	libsoup3-devel >= 3.0.0
+%else
 Requires:	libsoup-devel >= 2.44.0
+%endif
 Requires:	libxml2-devel >= 1:2.6.30
-Obsoletes:	gnome-applets-devel <= 2.21.4
-Obsoletes:	libgweather-static < 3.28.0
 
 %description devel
 Header files for libgweather.
@@ -89,21 +98,7 @@ libgweather API documentation.
 %description apidocs -l pl.UTF-8
 Dokumentacja API biblioteki libgweather.
 
-%package glade
-Summary:	libgweather catalog file for Glade
-Summary(pl.UTF-8):	Plik katalogu libgweather dla Glade
-Group:		X11/Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-Requires:	glade >= 2.0
-BuildArch:	noarch
-
-%description glade
-libgweather catalog file for Glade.
-
-%description glade -l pl.UTF-8
-Plik katalogu libgweather dla Glade.
-
-%package -n vala-libgweather
+%package -n vala-libgweather4
 Summary:	libgweather API for Vala language
 Summary(pl.UTF-8):	API biblioteki libgweather dla języka Vala
 Group:		Development/Libraries
@@ -111,21 +106,22 @@ Requires:	%{name}-devel = %{version}-%{release}
 Requires:	vala >= 2:0.18.0
 BuildArch:	noarch
 
-%description -n vala-libgweather
+%description -n vala-libgweather4
 libgweather API for Vala language.
 
-%description -n vala-libgweather -l pl.UTF-8
+%description -n vala-libgweather4 -l pl.UTF-8
 API biblioteki libgweather dla języka Vala.
 
 %prep
-%setup -q
+#%setup -q
+%setup -q -n libgweather-%{version}
 
 %build
 %meson build \
-	-Dglade_catalog=%{!?with_glade:false}%{?with_glade:true} \
-	-Dgtk_doc=true \
-	-Dzoneinfo_dir=%{_datadir}/zoneinfo \
-	-Denable_vala=%{!?with_vala:false}%{?with_vala:true}
+	-Denable_vala=%{!?with_vala:false}%{?with_vala:true} \
+	%{?with_apidocs:-Dgtk_doc=true} \
+	%{?with_libsoup3:-Dsoup2=false} \
+	-Dzoneinfo_dir=%{_datadir}/zoneinfo
 
 %ninja_build -C build
 
@@ -134,10 +130,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %ninja_install -C build
 
+%if %{with apidocs}
+# FIXME: where to package gi-docgen generated docs?
+install -d $RPM_BUILD_ROOT%{_gtkdocdir}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/libgweather-4.0 $RPM_BUILD_ROOT%{_gtkdocdir}
+%endif
+
 # just a copy of es
 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/es_ES
 
-%find_lang libgweather-3.0 --all-name
+# libgweather-4.0 and libgweather-4.0-locations domains
+%find_lang libgweather-4.0 --all-name
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -150,40 +153,40 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/ldconfig
 %glib_compile_schemas
 
-%files -f libgweather-3.0.lang
+%files -f libgweather-4.0.lang
 %defattr(644,root,root,755)
-%doc AUTHORS NEWS README.md
-%attr(755,root,root) %{_libdir}/libgweather-3.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgweather-3.so.16
-%dir %{_libdir}/libgweather
-%{_libdir}/libgweather/Locations.bin
-%{_datadir}/glib-2.0/schemas/org.gnome.GWeather.enums.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.GWeather.gschema.xml
-%dir %{_datadir}/libgweather
-%{_datadir}/libgweather/Locations.xml
-%{_datadir}/libgweather/locations.dtd
-%{_libdir}/girepository-1.0/GWeather-3.0.typelib
+%doc NEWS README.md
+%attr(755,root,root) %{_libdir}/libgweather-4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgweather-4.so.0
+%dir %{_libdir}/libgweather-4
+%{_libdir}/libgweather-4/Locations.bin
+%{_datadir}/glib-2.0/schemas/org.gnome.GWeather4.enums.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.GWeather4.gschema.xml
+%dir %{_datadir}/libgweather-4
+%{_datadir}/libgweather-4/Locations.xml
+%{_datadir}/libgweather-4/locations.dtd
+%{_libdir}/girepository-1.0/GWeather-4.0.typelib
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgweather-3.so
-%{_includedir}/libgweather-3.0
-%{_pkgconfigdir}/gweather-3.0.pc
-%{_datadir}/gir-1.0/GWeather-3.0.gir
+%attr(755,root,root) %{_libdir}/libgweather-4.so
+%{_includedir}/libgweather-4.0
+%{_pkgconfigdir}/gweather4.pc
+%{_datadir}/gir-1.0/GWeather-4.0.gir
 
-%files apidocs
+%files static
 %defattr(644,root,root,755)
-%{_gtkdocdir}/libgweather
+%{_libdir}/libgweather-4.a
 
-%if %{with glade}
-%files glade
+%if %{with apidocs}
+%files apidocs
 %defattr(644,root,root,755)
-%{_datadir}/glade/catalogs/libgweather.xml
+%{_gtkdocdir}/libgweather-4.0
 %endif
 
 %if %{with vala}
-%files -n vala-libgweather
+%files -n vala-libgweather4
 %defattr(644,root,root,755)
-%{_datadir}/vala/vapi/gweather-3.0.vapi
-%{_datadir}/vala/vapi/gweather-3.0.deps
+%{_datadir}/vala/vapi/gweather4.vapi
+%{_datadir}/vala/vapi/gweather4.deps
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgweather4.git/commitdiff/50060773a65756024e37053482995a54430a2f05



More information about the pld-cvs-commit mailing list