%global tarname goocanvas
%global apiver 2.0
Name: goocanvas2
Version: 2.0.1
Release: 1%{?dist}
Summary: A new canvas widget for GTK+ that uses cairo for drawing
Group: System Environment/Libraries
License: LGPLv2+
URL: http://live.gnome.org/GooCanvas
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{tarname}/1.90/%{tarname}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext, pkgconfig
BuildRequires: autoconf, automake, libtool, gtk-doc
BuildRequires: gtk3-devel >= 2.91.3
BuildRequires: cairo-devel >= 1.4.0
BuildRequires: gobject-introspection-devel
# For the girepository-1.0 directory
Requires: gobject-introspection
%description
GooCanvas is a new canvas widget for GTK+ that uses the cairo 2D library for
drawing. It has a model/view split, and uses interfaces for canvas items and
views, so you can easily turn any application object into canvas items.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?isa} = %{version}-%{release}
Requires: gobject-introspection-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n %{tarname}-%{version}
%build
# python GI wrapper is not enabled yet until i figure a proper way to package it
%configure --disable-static \
--with-html-dir=%{_datadir}/gtk-doc/html/%{tarname}-%{apiver} \
--enable-python=no
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING README ChangeLog AUTHORS NEWS TODO
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/GooCanvas-2.0.typelib
%files devel
%defattr(-,root,root,-)
%doc
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{tarname}-%{apiver}.pc
%{_datadir}/gtk-doc/html/%{tarname}-%{apiver}
%{_datadir}/gir-1.0/GooCanvas-2.0.gir
%changelog
* Mon Oct 10 2011 Haïkel Guémar <haikel.guemar@sysfera.com> - 2.0.1-1
- upstream 2.0.1
- remove upstreamed patch and enable GIR
* Fri Feb 11 2011 Haïkel Guémar <hguemar@fedoraproject.org> - 1.90.2-1
- initial package