Name:           gdk-pixbuf2
Version:        2.38.0
Release:        9
Summary:        gdk is a multi-platform toolkit for creating graphical user interfaces.

License:        LGPLv2+
URL:            http://www.gtk.org
Source0:        http://download.gnome.org/sources/gdk-pixbuf/2.38/gdk-pixbuf-%{version}.tar.xz

BuildRequires:  gettext gtk-doc pkgconfig(gio-2.0) >= 2.48.0 libpng-devel libjpeg-devel libtiff-devel shared-mime-info
BuildRequires:  meson pkgconfig(x11) pkgconfig(gobject-introspection-1.0) >= 0.9.3 gobject-introspection-devel libxslt gdb

Requires:       glib2 >= 2.48.0 shared-mime-info

Provides:       %{name}-modules %{name}-xlib
Obsoletes:      %{name}-modules %{name}-xlib

%description
gdk is written in C but has been designed from the ground up to support a wide range of languages.
It provide a complete set of widgets,and suitable for projects ranging from small one-off
tools to complete application suites.

%package        devel
Summary:        Development files for gdk-pixbuf , gdk-pixbuf-xlib,Tests for the gdk-pixbuf2 package
Requires:       %{name} = %{version}-%{release} glib2-devel >= 2.48.0
Provides:       %{name}-xlib-devel %{name}-tests
Obsoletes:      %{name}-xlib-devel %{name}-tests

%description    devel
This package contains libraries and header files needed for doing development and
speeding up your development time

%package help
Summary:        Development Documentation files for gdk-pixbuf2 and xlib library
Buildarch: noarch
Requires:       %{name} = %{version}-%{release}

%description    help
The gdk-pixbuf2 package contains the documentation files which is useful for
developing applications that uses gdk-pixbuf2 xlib and test.


%prep
%autosetup -n gdk-pixbuf-%{version} -p1

%build
%meson -Dbuiltin_loaders=png -Ddocs=true 

%global _smp_mflags -j1
%meson_build

%install
%meson_install

touch $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
(cd $RPM_BUILD_ROOT%{_bindir}; mv gdk-pixbuf-query-loaders gdk-pixbuf-query-loaders-%{__isa_bits})

%find_lang gdk-pixbuf

%transfiletriggerin -- %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders
gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache

%transfiletriggerpostun -- %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders
gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache

%files -f gdk-pixbuf.lang
%defattr(-,root,root)
%doc NEWS
%license COPYING
%{_libdir}/libgdk_pixbuf*.so.*
%{_libdir}/girepository-1.0
%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/*.so
%ghost %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
%{_bindir}/gdk-pixbuf-query-loaders-%{__isa_bits}
%{_bindir}/gdk-pixbuf-thumbnailer
%{_datadir}/thumbnailers/

%files devel
%defattr(-,root,root)
%{_includedir}/gdk-pixbuf-2.0/gdk-pixbuf
%{_includedir}/gdk-pixbuf-2.0/gdk-pixbuf-xlib
%{_libdir}/libgdk_pixbuf*.so
%{_libdir}/pkgconfig/gdk-pixbuf-*.pc
%{_bindir}/gdk-pixbuf-csource
%{_bindir}/gdk-pixbuf-pixdata
%{_libexecdir}/installed-tests
%{_datadir}/gir-1.0
%{_datadir}/gtk-doc/html/*
%{_datadir}/installed-tests


%files help
%defattr(-,root,root)
%{_mandir}/man1/gdk-pixbuf-query-loaders.1*
%{_mandir}/man1/gdk-pixbuf-csource.1*

%changelog
* Fri Mar 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.38.0-9
- add gdb in buildrequires

* Mon Jan 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.38.0-8
- remove the jasper

* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.38.0-7
- change the path of files

* Mon Oct 28 2019 zoujing <zoujing13@huawei.com>  - 2.38.0-6
- add gobject-introspection-devel

* Wed Sep 18 2019 openEuler jimmy<dukaitian@huawei.com>  - 2.38.0-5
- Package init jimmy
