Name: libgxps
Version: 0.2.0
Release: 2%{?dist}
Summary: GObject based library for handling and rendering XPS documents
Group: System Environment/Libraries
License: LGPLv2+
URL: http://live.gnome.org/libgxps
Source0: http://ftp.gnome.org/pub/gnome/sources/%{name}/0.2/%{name}-%{version}.tar.bz2
# Patch from upstream to link with libm
# https://bugzilla.gnome.org/show_bug.cgi?id=664439
Patch0: libgxps-0.2.0-libm.patch
# Patch from upstream for libpng15 support
# https://bugzilla.gnome.org/show_bug.cgi?id=664666
Patch1: libgxps-0.2.0-libpng15.patch
BuildRequires: gtk3-devel
BuildRequires: glib2-devel
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: cairo-devel
BuildRequires: libarchive-devel
BuildRequires: freetype-devel
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: lcms2-devel
# Required temporarily for libm patch
BuildRequires: libtool
%description
libgxps is a GObject based library for handling and rendering XPS
documents.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package tools
Summary: Development files for %{name}
Group: Applications/Text
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tools
The %{name}-tools contains command-line programs for manipulating GPX format
documents using the %{name} library.
%prep
%setup -q
%patch0 -p1 -b .libm
%patch1 -p1 -b .libpng15
autoreconf -i
%build
%configure --disable-static --enable-man
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir
%{_datadir}/gtk-doc/html/libgxps
%files tools
%{_bindir}/xpsto*
%{_mandir}/man1/xpsto*.1.gz
%changelog
* Wed Jan 4 2012 Tom Hughes <tom@compton.nu> - 0.2.0-2
- Rebuilt for gcc 4.7 mass rebuild.
- Run autoreconf to update libtool.
* Thu Dec 1 2011 Tom Hughes <tom@compton.nu> - 0.2.0-1
- Update to 0.2.0 upstream release.
* Sat Nov 5 2011 Tom Hughes <tom@compton.nu> - 0.1.0-2
- Fix base package dependency in devel package.
* Fri Nov 4 2011 Tom Hughes <tom@compton.nu> - 0.1.0-1
- Initial build.