%global gtk3_version 3.24.15
%global glib2_version 2.53.4
%global gnome_desktop_version 2.91.2
%global libexif_version 0.6.14
%global libhandy_version 1.5.0

Name:          eog
Version:       43.1
Release:       1
Summary:       A GNOME Image Viewer
License:       GPLv2+
URL:           https://wiki.gnome.org/Apps/EyeOfGnome
Source0:       https://download.gnome.org/sources/%{name}/43/%{name}-%{version}.tar.xz

BuildRequires: pkgconfig(exempi-2.0) pkgconfig(gdk-pixbuf-2.0) 
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(libexif) >= %{libexif_version}
BuildRequires: pkgconfig(libhandy-1) >= %{libhandy_version}
BuildRequires: pkgconfig(gobject-introspection-1.0) pkgconfig(gsettings-desktop-schemas) pkgconfig(lcms2)
BuildRequires: pkgconfig(libpeas-1.0) >= 0.7.4 pkgconfig(libpeas-gtk-1.0) >= 0.7.4 pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(shared-mime-info) pkgconfig(x11) 
BuildRequires: desktop-file-utils gettext itstool libjpeg-devel meson zlib-devel libappstream-glib gi-docgen
#BuildRequires: pkgconfig(libportal)

Requires:      gsettings-desktop-schemas 
Requires:      glib2 >= %{glib2_version} 
Requires:      gtk3 >= %{gtk3_version}
Requires:      libhandy%{?_isa} >= %{libhandy_version}
Provides:      bundled(libjpeg)

%description
EOG is an application used for viewing and cataloging image files on the
GNOME Desktop.It has basic editing capabilites.

%package devel
Summary: developing plugins for the eog image viewer
Requires: %{name} = %{version}-%{release}
Requires: python3-dogtail python3-behave

%description devel
Development files for eog.
verify the Usability of the eog package.

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

%build
%meson \
       -Dgtk_doc=true \
       -Dinstalled_tests=true \
       -Dlibportal=false
%meson_build

%install
%meson_install

%find_lang %{name} --with-gnome

%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnome.eog.desktop

%files -f %{name}.lang
%doc AUTHORS NEWS README.md
%license COPYING
%{_datadir}/eog
%{_datadir}/applications/org.gnome.eog.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_bindir}/*
%{_libdir}/eog
%{_datadir}/GConf/gsettings/eog.convert
%{_datadir}/glib-2.0/schemas/org.gnome.eog.enums.xml
%{_datadir}/glib-2.0/schemas/org.gnome.eog.gschema.xml
%{_datadir}/metainfo/eog.appdata.xml

%files devel
%{_includedir}/eog-3.0
%{_libdir}/pkgconfig/eog.pc
%{_datadir}/gtk-doc/
%{_libexecdir}/eog/installed-tests/
%{_datadir}/installed-tests/

%changelog
* Mon Jan 2 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 43.1-1
- Update to 43.1 for gnome 43

* Mon Jun 6 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.2-1
- Update to 42.2

* Mon Mar 28 2022 dillon chen <dillon.chen@gmail.com> - 42.0-1
- Update to 42.0

* Mon Jun 7 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.3-1
- Upgrade to 3.38.3
- Update Version, Release, Source0, BuildRequires
- Temporaryly disable libportal, because there isn't in cunrrent community

* Fri Sep 11 2020 wangyue<wangyue92@huawei.com> - 3.28.4-3
- Use python3-dogtail to replace python-dogtail

* Fri Nov 22 2019 gulining<gulining1@huawei.com> - 3.28.4-2
- Pakcage init
