Name: waffle
Version: 1.2.3
Release: 4%{?dist}
Summary: Platform independent GL API layer
Group: Development/Libraries
License: MIT
URL: http://people.freedesktop.org/~chadversary/waffle/releases.html
Source0: http://people.freedesktop.org/~chadversary/%{name}/files/release/%{name}-%{version}/%{name}-%{version}.tar.xz
BuildRequires: cmake libxslt docbook-style-xsl libxcb-devel
BuildRequires: libX11-devel mesa-libGL-devel mesa-libGLU-devel
BuildRequires: chrpath
BuildRequires: mesa-libEGL-devel mesa-libGLES-devel
%description
Waffle is a cross-platform C library that allows one to defer
selection of GL API and of window system until runtime.
%package devel
Summary: Development headers and libraries for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Contains the header files, and libraries required for development of
%{name}-related software.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name}%{?_isa} = %{version}-%{release}
%description doc
Contains HTML version of the developer documentation for development of
%{name}-related software (manpages are in the -devel package).
%package examples
Summary: Example programs using %{name}
Group: Development/Tools
Requires: %{name}%{?_isa} = %{version}-%{release}
%description examples
Example programs using %{name}.
%prep
%setup -q
%build
%cmake \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_defaultdocdir}/%{name}-%{version} \
-DCMAKE_BUILD_STRIP=FALSE \
-Dwaffle_has_glx=1 \
-Dwaffle_build_manpages=1 -Dwaffle_build_htmldocs=1 .
make VERBOSE=1 %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# Fedora now uses unversioned doc dirs, make install shouldn’t try to
# install there anyway.
rm -rf %{buildroot}%{_docdir}/%{name}*
# Move examples to _libdir
install -d %{buildroot}%{_libdir}/%{name}-examples
chrpath -d examples/{gl_basic,simple-x11-egl}
install -p examples/{gl_basic,simple-x11-egl} \
%{buildroot}%{_libdir}/%{name}-examples
%postun -p /sbin/ldconfig
%post -p /sbin/ldconfig
%files
%doc README.txt LICENSE.txt
%{_libdir}/lib%{name}*.so.*
%files doc
%doc doc/html/
%files devel
%doc doc/release-notes/
%{_includedir}/waffle*
%{_libdir}/lib%{name}*.so
%{_libdir}/pkgconfig/%{name}*
%{_datadir}/cmake/Modules/FindWaffle.cmake
%{_mandir}/man*/*
%files examples
%{_libdir}/%{name}-examples/*
%changelog
* Fri Sep 27 2013 Matěj Cepl <mcepl@redhat.com> - 1.2.3-4
- And even more fixes (switch on man and HTML doc generation).
* Thu Sep 26 2013 Matěj Cepl <mcepl@redhat.com> - 1.2.3-3
- Fix even more errors indicated by the package review.
* Mon Aug 26 2013 Matěj Cepl <mcepl@redhat.com> - 1.2.3-2
- Fix errors indicated by the package review.
* Sat Aug 24 2013 Matěj Cepl <mcepl@redhat.com> - 1.2.3-1
- New upstream release.
* Thu Nov 15 2012 Matěj Cepl <mcepl@redhat.com> - 1.2.0-1
- Upstream upgrade.
* Fri Oct 19 2012 Matěj Cepl <mcepl@redhat.com> - 1.1.1-1
- First experimental build.