# 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
-%bcond_without ogre # build samples with ogre3d
+%bcond_without ogre # build without Ogre renderer
+%bcond_without opengl # build without OpenGL renderer
%bcond_with samples # build samples
#
Summary: CEGUI - a free library providing windowing and widgets
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
BuildRequires: DevIL-devel
BuildRequires: DirectFB-devel
BuildRequires: FreeImage-devel
+%if %{with opengl}
BuildRequires: OpenGL-GLU-devel
BuildRequires: OpenGL-glut-devel
+%endif
BuildRequires: SILLY-devel >= 0.1.0
BuildRequires: autoconf >= 2.59
BuildRequires: automake
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 docs -l pl.UTF-8
Dokumentacja CEGUI.
+%package OPENGL
+Summary: OpenGLRenderer library for CEGUI
+Summary(pl.UTF-8): Biblioteka OpenGLRenderer dla CEGUI
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description OPENGL
+OpenGLRenderer library for CEGUI.
+
+%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
--with-default-xml-parser=LibxmlParser \
%{!?with_samples:--disable-samples} \
--%{?with_ogre:en}%{!?with_ogre:dis}able-ogre-renderer \
+ --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-renderer \
--%{?with_xercesc:en}%{!?with_xercesc:dis}able-xerces-c
%{__make}
%files
%defattr(644,root,root,755)
%doc doc/README
-# libs
%attr(755,root,root) %{_libdir}/libCEGUIBase-%{version}.so
-%attr(755,root,root) %{_libdir}/libCEGUIOpenGLRenderer-%{version}.so
# plugins
%attr(755,root,root) %{_libdir}/libCEGUICoronaImageCodec-%{version}.so
%attr(755,root,root) %{_libdir}/libCEGUICoronaImageCodec.so
%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
%{_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
+%endif
+
+%if %{with ogre}
+%files OGRE
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libCEGUIOgreRenderer-%{version}.so
+%endif