Name:		rest
Version:	0.10.2
Release:	2
Summary:	A library for access to RESTful web services
License:	LGPL-2.1-or-later
URL:		https://www.gnome.org
Source0:	https://download.gnome.org/sources/lib%{name}/%{version_major_minor}/lib%{name}-%{version}.tar.xz

Patch2:		skip-some-failed-tests.patch
Patch3:		backport-fix-weak-random-generation-in-pkce.patch

BuildRequires:  meson >= 0.56
BuildRequires:  pkgconfig(glib-2.0) >= 2.44
BuildRequires:  pkgconfig(gobject-2.0) >= 2.44
BuildRequires:  pkgconfig(gtksourceview-5)
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(libsoup-3.0) >= 2.99.2
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  gobject-introspection-devel
BuildRequires:  /usr/bin/gi-docgen

%description
This library has been designed to make it easier to access web services that
claim to be "RESTful". It comprises of two parts: the first aims to make it
easier to make requests by providing a wrapper around libsoup, the second
aids with XML parsing by wrapping libxml2.

%package devel
Summary: Development files for rest
Requires: %{name} = %{version}-%{release}

%description devel
This package is the development files for rest.

%package demo
Summary: Demo application for %{name}
Requires: %{name} = %{version}-%{release}

%description demo
Demo application for %{name}.

%package_help

%prep
%autosetup -n lib%{name}-%{version} -p1

%build
%meson
%meson_build

%install
%meson_install

%check
%meson_test

%files
%doc AUTHORS
%license COPYING
%{_libdir}/librest-1.0.so.*
%{_libdir}/librest-extras-1.0.so.*
%{_libdir}/girepository-1.0/Rest-*
%{_libdir}/girepository-1.0/RestExtras-*

%files devel
%{_includedir}/rest-1.0
%{_libdir}/librest-1.0.so
%{_libdir}/librest-extras-1.0.so
%{_datadir}/gir-1.0/Rest-*
%{_datadir}/gir-1.0/RestExtras-*
%{_libdir}/pkgconfig/rest*

%files demo
%{_datadir}/applications/org.gnome.RestDemo.desktop
%{_bindir}/librest-demo

%files help
%doc README.md
%{_datadir}/doc/librest-1.0

%changelog
* Wed Aug 19 2026 shaojiansong <shaojiansong@kylinos.cn> - 0.10.2-2
- Fix weak random number generation in PKCE implementation (CVE-2026-16615)

* Tue Oct 21 2025 Funda Wang <fundawang@yeah.net> - 0.10.2-1
- update to 0.10.2

* Wed Jul 03 2024 zhouyihang <zhouyihang3@h-partners.com> - 0.9.1-4
- Type:requirements
- Id:NA
- SUG:NA
- DESC:use libsoup2 instead of libsoup3 for build when no libsoup3 provided

* Thu Oct 26 2023 zhouyihang <zhouyihang3@h-partners.com> - 0.9.1-3
- Type:requirements
- Id:NA
- SUG:NA
- DESC:enable test

* Sat Mar 25 2023 zhouyihang <zhouyihang3@h-partners.com> - 0.9.1-2
- Type:requirements
- Id:NA
- SUG:NA
- DESC:remove useless libs

* Thu Feb 02 2023 zhouyihang <zhouyihang3@h-partners.com> - 0.9.1-1
- Type:requirements
- Id:NA
- SUG:NA
- DESC:update rest to 0.9.1

* Wed Nov 09 2022 zhouyihang <zhouyihang3@h-partners.com> - 0.8.1-8
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:xml do not crash parsing empty XML string

* Sat Nov 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.8.1-7
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add the libxslt in buildrequires

* Tue Sep 3 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.8.1-6
- Type: enhancement
- ID:   NA
- SUG:  NA
- DESC: rebuilt spec, add help package

* Tue Aug 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.8.1-5
- Package init