# TODO:
# - external tinyxml
# - external tolua++
-# - ogre-renderer (BR: CEGUI-OGRE >= 1.0.0 through pkgconfig)
-# - maybe we should make subpackages? For example CEGUI-OPENGL (smc.spec)?
+# - STOP THIS ALL CAPS I CAN WRITE MADNESS. FOR EXAMPLE OPENGL IS NOT ALL CAPS
+# IN UPSTREAM AND SO IS NOT OGRE IN ALL CAPS
#
# Conditional build:
%bcond_without xercesc # build XercesParser
Summary(pl.UTF-8): CEGUI - wolnodostępna biblioteka zapewniającą okienka i widgety
Name: CEGUI
Version: 0.7.1
-Release: 0.1
+Release: 1
License: LGPL v2.1+ (with MIT parts)
Group: Libraries
Source0: http://downloads.sourceforge.net/crayzedsgui/%{name}-%{version}.tar.gz
Summary(pl.UTF-8): Pliki programistyczne dla CEGUI
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+Requires: %{name}-OGRE = %{version}-%{release}
+Requires: %{name}-OPENGL = %{version}-%{release}
Requires: freetype-devel >= 2.0
Requires: libstdc++-devel
Requires: pcre-devel >= 5.0
%description OPENGL -l pl.UTF-8
Biblioteka OpenGLRenderer dla CEGUI.
+%package OGRE
+Summary: OgreRenderer library for CEGUI
+Summary(pl.UTF-8): Biblioteka OgreRenderer dla CEGUI
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description OGRE
+OgreRenderer library for CEGUI.
+
+%description OGRE -l pl.UTF-8
+Biblioteka OgreRenderer dla CEGUI
+
%prep
%setup -q -a 1
%patch0 -p1
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libCEGUIBase.so
+%attr(755,root,root) %{_libdir}/libCEGUIOgreRenderer.so
+%attr(755,root,root) %{_libdir}/libCEGUIOpenGLRenderer.so
%{_libdir}/libCEGUIBase.la
+%{_libdir}/libCEGUIOgreRenderer.la
+%{_libdir}/libCEGUIOpenGLRenderer.la
# plugins - but as their headers are included...
%{_libdir}/libCEGUICoronaImageCodec.la
%{_libdir}/libCEGUIDevILImageCodec.la
%{_includedir}/%{name}
%{_pkgconfigdir}/CEGUI.pc
%{_pkgconfigdir}/CEGUI-OPENGL.pc
+%{_pkgconfigdir}/CEGUI-OGRE.pc
%if %{with opengl}
%files OPENGL
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libCEGUIOpenGLRenderer-%{version}.so
-%attr(755,root,root) %{_libdir}/libCEGUIOpenGLRenderer.so
-%{_libdir}/libCEGUIOpenGLRenderer.la
+%endif
+
+%if %{with ogre}
+%files OGRE
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libCEGUIOgreRenderer-%{version}.so
%endif