%global major 0 %global gmajor 4.0 %define libname %mklibname gweather4_ %{major} %define girname %mklibname gweather-gir %{gmajor} %define devname %mklibname -d gweather4 %global tarball_version %%(echo %{version} | tr '~' '.') %define url_ver %{lua: ver = rpm.expand("%{version}"); majmin, count1 = string.gsub(ver, "^(%d+%.%d+).*", "%1", 1); if count1 == 0 then print(ver); return; end; maj, count2 = string.gsub(majmin, "^(%d+).*", "%1", 1); if count2 == 0 then print(majmin) elseif tonumber(majmin) < 40 then print(majmin) else print(maj) end} Name: libgweather4 Version: 4.2.0 Release: %mkrel 1 Summary: A library for weather information Group: Graphical desktop/GNOME License: GPLv2+ URL: https://wiki.gnome.org/Projects/LibGWeather Source0: https://download.gnome.org/sources/libgweather/%{url_ver}/libgweather-%{tarball_version}.tar.xz BuildRequires: gcc BuildRequires: gettext BuildRequires: gi-docgen BuildRequires: meson BuildRequires: pkgconfig(geocode-glib-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(libsoup-3.0) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(vapigen) BuildRequires: python3-gobject-base %description libgweather is a library to access weather information from online services for numerous locations. %package -n %{libname} Summary: Library for %{name} Requires: %{name} >= %{version}-%{release} %description -n %{libname} The %{libname} package contains libraries for applications that use %{name}. %package -n %{girname} Summary: GObject Introspection interface description for GWeather Requires: %{libname} = %{version}-%{release} Conflicts: %{name} < 4.1.1 %description -n %{girname} GObject Introspection interface description for GWeather. %package -n %{devname} Summary: Development files for %{name} Requires: %{libname} = %{version}-%{release} Requires: %{girname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Obsoletes: %{_lib}gweather4-devel-doc < 4.1.1 %description -n %{devname} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -p1 -n libgweather-%{tarball_version} %build %meson -Dgtk_doc=true %meson_build %install %meson_install %find_lang %{name} --all-name %files -f %{name}.lang %doc CONTRIBUTING.md NEWS README.md %license COPYING %dir %{_libdir}/libgweather-4/ %{_libdir}/libgweather-4/Locations.bin %dir %{_datadir}/libgweather-4/ %{_datadir}/libgweather-4/Locations.xml %{_datadir}/libgweather-4/locations.dtd %{_datadir}/glib-2.0/schemas/org.gnome.GWeather4.enums.xml %{_datadir}/glib-2.0/schemas/org.gnome.GWeather4.gschema.xml %files -n %{libname} %{_libdir}/libgweather-4.so.%{major}{,.*} %files -n %{girname} %{_libdir}/girepository-1.0/GWeather-4.0.typelib %files -n %{devname} %doc %{_docdir}/libgweather-4.0 %{_includedir}/libgweather-4.0/ %{_libdir}/libgweather-4.so %{_libdir}/pkgconfig/gweather4.pc %{_datadir}/gir-1.0/GWeather-4.0.gir %{_datadir}/vala/vapi/gweather4.deps %{_datadir}/vala/vapi/gweather4.vapi %changelog * Tue Sep 27 2022 wally <wally> 4.2.0-1.mga9 + Revision: 1892852 - new version 4.2.0 * Sun Sep 18 2022 wally <wally> 4.1.1-1.mga9 + Revision: 1889740 - new version 4.1.1 - build with libsoup-3.0 - split out gir typelib - merge devel docs into devel pkg * Tue Mar 15 2022 tv <tv> 3.99.0-1.mga9 + Revision: 1793396 - imported package libgweather4 * Tue Mar 15 2022 Thierry Vignaud <tv@mageia.org> 3.99.0-1.mga9 - Import from FC * Fri Mar 04 2022 David King <amigadave@amigadave.com> - 3.99.0-1 - Update to 3.99.0 * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.91.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Jan 12 2022 David King <amigadave@amigadave.com> - 3.91.0-1 - Update to 3.91.0 * Sun Jan 09 2022 David King <amigadave@amigadave.com> - 3.90.0-1 - Initial import (#2038730)