geocode-glib/geocode-glib.spec
Yaakov Selkowitz 8d4358cf9d Do not build with soup2 on RHEL 10
libsoup (2.y) is unmaintained upstream; nothing in RHEL 10 uses the
soup2-based version.
2023-07-11 22:03:52 -04:00

130 lines
3.6 KiB
RPMSpec

%bcond soup2 %[%{undefined rhel} || 0%{?rhel} < 10]
%global json_glib_version 0.99.2
Name: geocode-glib
Version: 3.26.4
Release: %autorelease
Summary: Geocoding helper library
License: LGPLv2+
URL: http://www.gnome.org/
Source0: http://download.gnome.org/sources/%{name}/3.26/%{name}-%{version}.tar.xz
BuildRequires: gettext
BuildRequires: gtk-doc
BuildRequires: meson
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(json-glib-1.0) >= %{json_glib_version}
%if %{with soup2}
BuildRequires: pkgconfig(libsoup-2.4)
%endif
BuildRequires: pkgconfig(libsoup-3.0)
Requires: json-glib%{?_isa} >= %{json_glib_version}
Requires: %{name}-data = %{version}-%{release}
%description
geocode-glib is a convenience library for the geocoding (finding longitude,
and latitude from an address) and reverse geocoding (finding an address from
coordinates). It uses Nominatim service to achieve that. It also caches
(reverse-)geocoding requests for faster results and to avoid unnecessary server
load.
%package data
Summary: Icon files for %{name}
%description data
The %{name}-devel package contains icon files for applications that use %{name}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n geocode-glib2
Summary: Development files for %{name}
Requires: json-glib%{?_isa} >= %{json_glib_version}
Requires: %{name}-data = %{version}-%{release}
%description -n geocode-glib2
geocode-glib is a convenience library for the geocoding (finding longitude,
and latitude from an address) and reverse geocoding (finding an address from
coordinates). It uses Nominatim service to achieve that. It also caches
(reverse-)geocoding requests for faster results and to avoid unnecessary server
load.
This package contains version 2 of the API, which uses libsoup3 internally.
%package -n geocode-glib2-devel
Summary: Development files for %{name}
Requires: geocode-glib2%{?_isa} = %{version}-%{release}
%description -n geocode-glib2-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
%if %{with soup2}
%define _vpath_builddir %{_vendor}-%{_target_os}-build-soup2
%meson -Denable-installed-tests=false
%meson_build
%endif
%define _vpath_builddir %{_vendor}-%{_target_os}-build-soup3
%meson -Denable-installed-tests=false -Dsoup2=false
%meson_build
%install
%if %{with soup2}
%define _vpath_builddir %{_vendor}-%{_target_os}-build-soup2
%meson_install
%endif
%define _vpath_builddir %{_vendor}-%{_target_os}-build-soup3
%meson_install
%if %{with soup2}
%files
%license COPYING.LIB
%doc AUTHORS NEWS README
%{_libdir}/libgeocode-glib.so.0*
%{_libdir}/girepository-1.0/GeocodeGlib-1.0.typelib
%files devel
%{_includedir}/geocode-glib-1.0/
%{_libdir}/libgeocode-glib.so
%{_libdir}/pkgconfig/geocode-glib-1.0.pc
%{_datadir}/gir-1.0/GeocodeGlib-1.0.gir
%doc %{_datadir}/gtk-doc/
%endif
%files data
%{_datadir}/icons/hicolor/scalable/places/*.svg
%files -n geocode-glib2
%license COPYING.LIB
%doc AUTHORS NEWS README
%{_libdir}/libgeocode-glib-2.so.0*
%{_libdir}/girepository-1.0/GeocodeGlib-2.0.typelib
%files -n geocode-glib2-devel
%{_includedir}/geocode-glib-2.0/
%{_libdir}/libgeocode-glib-2.so
%{_libdir}/pkgconfig/geocode-glib-2.0.pc
%{_datadir}/gir-1.0/GeocodeGlib-2.0.gir
%doc %{_datadir}/gtk-doc/
%changelog
%autochangelog