Name:           cheese
Epoch:          2
Version:        44.1
Release:        1
Summary:        Application for taking pictures and movies from a webcam
License:        GPLv2+
URL:            https://wiki.gnome.org/Apps/Cheese
Source0:        https://download.gnome.org/sources/%{name}/43/%{name}-%{version}.tar.xz

BuildRequires:  gcc chrpath
BuildRequires:  meson
BuildRequires:  gtk-doc
BuildRequires:  desktop-file-utils
BuildRequires:  docbook-dtds
BuildRequires:  docbook-style-xsl
BuildRequires:  gettext
BuildRequires:  itstool
BuildRequires:  libXtst-devel
BuildRequires:  vala
BuildRequires:  pkgconfig(clutter-1.0)
BuildRequires:  clutter-gst3-devel
BuildRequires:  pkgconfig(clutter-gtk-1.0)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.27.90
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gstreamer-pbutils-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-bad-1.0)
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(x11)
BuildRequires:  libappstream-glib libxslt

Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: gstreamer1-plugins-good%{?_isa}
Requires: gstreamer1-plugins-bad-free%{?_isa}
Requires: gnome-video-effects

%description
Cheese is a Photobooth-inspired GNOME application for taking pictures and
videos from a webcam. It can also apply fancy graphical effects.

%package        libs
Summary:        Webcam display and capture widgets
License:        GPLv2+
Obsoletes:      cheese-camera-service < 2:3.25.90

%description libs
This package contains libraries needed for applications that
want to display a webcam in their interface.

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

%description devel
This package contains the libraries and header files that are needed
for writing applications that require a webcam display widget.

%package_help

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

%build
%meson -Dtests=false
%meson_build

%install
%meson_install
%delete_la_and_a

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

%ldconfig_scriptlets libs

%check
desktop-file-validate %{buildroot}%{_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
%{_datadir}/glib-2.0/schemas/org.gnome.Cheese.gschema.xml

%files libs -f cheese.lang
%license COPYING
%{_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/

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

%changelog
* Tue Nov 14 2023 wangqia <wangqia@uniontech.com> - 2:44.1-1
- Upgrade to 44.1

* Mon Jan 02 2023 lin zhang <lin.zhang@turbolinux.com.cn> 2:43.0-1
- update to 43.0

* Tue Aug 02 2022 Wei, Qiang <qiang.wei@suse.com> - 2:41.1-2
- Move gsettings file from libs package to cheese package.

* Fri Apr 15 2022 dillon chen <dillon.chen@gmail.com> - 41.1-1
- Update to 41.1

* 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
