Name:           cheese
Version:        3.38.0
Release:        1
Epoch:          2
Summary:        Take photos and videos with webcam

License:        GPLv2+
URL:            https://wiki.gnome.org/Apps/Cheese
Source0:        https://download.gnome.org/sources/%{name}/3.38/%{name}-%{version}.tar.xz

Patch0001:      Fix-infinite-loop-if-thumbnailer-is-not-available.patch

BuildRequires:  chrpath desktop-file-utils docbook-dtds docbook-style-xsl gettext 
BuildRequires:  itstool libXtst-devel libappstream-glib libxslt clutter-devel clutter-gst3-devel
BuildRequires:  clutter-gtk-devel gdk-pixbuf2-devel glib2-devel gnome-desktop3-devel vala
BuildRequires:  gobject-introspection-devel gstreamer1-plugins-base-devel libcanberra-devel
BuildRequires:  gstreamer1-plugins-bad-free-devel gtk3-devel libX11-devel
BuildRequires:  meson gtk-doc
Requires:       gstreamer1-plugins-good gstreamer1-plugins-bad-free gnome-video-effects
Requires:       %{name}-libs = %{epoch}:%{version}-%{release}

%description
Cheese is a program for the GNOME Desktop which allows you to take photos,
videos, and anything else you can think of with your webcam.

%package        libs
Summary:        libraries for %{name}

License:        GPLv2+

%description    libs
Libraries needed for applications that want to display a webcam in their interface
are contained in this package.

%package        devel
Summary:        %{name}-libs development files
License:        GPLv2+
Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
Provides:       %{name}-libs-devel
Obsoletes:      %{name}-libs-devel

%description    devel
The headers and other files that required to build the %{name}-libs application
are contained in %{name}-devel package.

%package_help

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

%build
%meson -Dtests=false
%meson_build

%install
%meson_install

%delete_la
%find_lang %{name} --with-gnome
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/cheese
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcheese-gtk.so.*

%ldconfig_scriptlets libs

%check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Cheese.desktop
%meson_test 

%files
%doc AUTHORS
%{_bindir}/cheese
%{_datadir}/icons/hicolor/*
%{_datadir}/dbus-1/services/org.gnome.Cheese.service
%{_datadir}/applications/org.gnome.Cheese.desktop
%{_datadir}/metainfo/org.gnome.Cheese.appdata.xml

%files libs -f cheese.lang
%license COPYING
%{_datadir}/glib-2.0/schemas/org.gnome.Cheese.gschema.xml
%{_libdir}/girepository-1.0/Cheese-3.0.typelib
%{_libdir}/*.so.*

%files devel
%{_datadir}/gir-1.0/Cheese-3.0.gir

%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/cheese/*.h

%files help
%doc README
%{_datadir}/gtk-doc/html/cheese/
%{_mandir}/man1/cheese.1.gz

%changelog
* Fri Jan 29 2021 yanglu <yanglu60@huawei.com> - 2:3.38.0-1
- update version

* Mon Sep 07 2020 zhanzhimin <zhanzhimin@huawei.com> - 2:3.32.0-2
- update source0

* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 2:3.32.0-1
- Package Init

