%define         cogl_version 1.8.2
%define         cogl_release 1%{?_dist_release}

Name:           cogl
Version:        %{cogl_version}
Release:        %{cogl_release}
Summary:        A small open source library for using 3D graphics hardware to draw pretty pictures

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://www.clutter-project.org/
Source0:        http://www.clutter-project.org/sources/%{name}/1.8/%{name}-%{version}.tar.xz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:	gobject-introspection-devel
BuildRequires:	libXcomposite-devel
BuildRequires:	mesa-libGL-devel
BuildRequires:	pango-devel
BuildRequires:	gtk-doc

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi

%description
Cogl is a small open source library for using 3D graphics hardware to draw
pretty pictures. The API departs from the flat state machine style of
OpenGL and is designed to make it easy to write orthogonal components that
can render without stepping on each others toes.

%package devel
Summary:        Development tools for cogl
Summary(ja):    cogl の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description devel
Header files and libraries for building a extension library for the
cogl.


%package        doc
Summary:        Documentation for cogl
Summary(ja):    cogl 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:	noarch


%description    doc
This package contains documentation for cogl.


%prep
%setup -q

%build
autoreconf -if
%configure --enable-gtk-doc \
	--disable-static \
	--enable-cairo=yes \
	--enable-gdk-pixbuf=yes \
	--enable-cogl-pango=yes \
	--enable-glx=yes \
	--enable-introspection=yes

make V=1

%install
rm -rf $RPM_BUILD_ROOT
#make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT install INSTALL="%{__install} -p -c"

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%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 ChangeLog AUTHORS COPYING NEWS README
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib

%files devel
%defattr(-, root, root)
%{_includedir}/cogl
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/*.gir

%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/cogl
%{_datadir}/gtk-doc/html/cogl-2.0-experimental

%changelog
* Fri Oct 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release

* Tue Sep 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.8-1
- new upstream release
- remove Patch0

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.6-1
- new upstream release
- add Patch0 (cogl-1.7.6-configure.patch)

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.4-1
- initial build for Vine Linux