Blob Blame History Raw
%global tarname goocanvas
%global apiver  2.0

Name:           goocanvas2
Version:        1.90.2
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
# GNOME BZ #642097 : fixes parallel installation with goocanvas
# fixed in git
Patch0:         goocanvas2-1.90.2-gettext.patch
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

%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} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -n %{tarname}-%{version}
%patch0 -p1
autoreconf -vif
# TODO: fix demos to build against latest Gtk+
sed -i -e 's/ demo / /g' Makefile.am
sed -i -e 's/ demo / /g' Makefile.in


%build
%configure --disable-static \
           --with-html-dir=%{_datadir}/gtk-doc/html/%{tarname}-%{apiver}
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.*

%files devel
%defattr(-,root,root,-)
%doc
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{tarname}-%{apiver}.pc
%{_datadir}/gtk-doc/html/%{tarname}-%{apiver}


%changelog
* Fri Feb 11 2011 Haïkel Guémar <hguemar@fedoraproject.org> - 1.90.2-1
- initial package