Name:           librsvg2
Version:        2.44.6
Release:        3
Summary:        An SVG library based on cairo
License:        LGPLv2+
URL:            https://wiki.gnome.org/Projects/LibRsvg
Source0:        https://download.gnome.org/sources/librsvg/2.44/librsvg-%{version}.tar.xz

BuildRequires:  chrpath gcc gobject-introspection-devel cairo-devel libxml2-devel 
BuildRequires:  fontconfig-devel gdk-pixbuf2-devel glib2-devel gtk3-devel 
BuildRequires:  libcroco-devel pango-devel vala cargo rust

Requires:       gdk-pixbuf2

Provides:       %{name}-tools = %{version}-%{release}
Obsoletes:      %{name}-tools < %{version}-%{release}

%description
An SVG library based on cairo.

%package        devel
Summary:        Libraries and include files for developing with librsvg
Requires:       %{name} = %{version}-%{release}

%description    devel
This package provides the necessary development libraries and include
files to allow you to develop with librsvg.

%package_help

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

%build
%configure --disable-gtk-doc --enable-introspection --enable-vala
%make_build

%install
%make_install
%delete_la
chrpath --delete %{buildroot}%{_bindir}/rsvg-convert
chrpath --delete %{buildroot}%{_bindir}/rsvg-view-3
chrpath --delete %{buildroot}%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-svg.so

rm -vrf %{buildroot}%{_datadir}/doc

%files
%defattr(-,root,root)
%license COPYING COPYING.LIB
%{_bindir}/rsvg-*
%{_libdir}/librsvg-2.so.*
%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-svg.so
%{_libdir}/girepository-1.0/Rsvg-2.0.typelib
%{_datadir}/thumbnailers/*.thumbnailer

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.a
%{_libdir}/pkgconfig/*.pc
%{_includedir}/librsvg-2.0/
%{_datadir}/gir-1.0/Rsvg-2.0.gir
%{_datadir}/vala/vapi/librsvg-2.0.vapi

%files help
%defattr(-,root,root)
%doc CONTRIBUTING.md README.md
%{_datadir}/gtk-doc/html/rsvg-2.0
%{_mandir}/man1/*.1*

%changelog
* Wed Dec 25 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.44.6-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: optimization the spec of librsvg2

* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.44.6-2
- Package init
