File sfml.spec of Package sfml
#
# spec file for package sfml
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define soname 1_6
Name: sfml
Version: 1.6
Release: 0
Summary: Simple and Fast Multimedia Library
License: Zlib and SUSE-Public-Domain
Group: Development/Libraries/C and C++
Url: http://www.sfml-dev.org/
Source: sfml-%{version}.tar.gz
# PATCH-FIX-UPSTREAM
Patch0: sfml-1.6-nochm.patch
# PATCH-FIX-UPSTREAM
Patch1: sfml-1.6-cflags.patch
# PATCH-FIX-UPSTREAM
Patch2: sfml-1.6-gcc.patch
# PATCH-FIX-UPSTREAM
Patch3: sfml-1.6-system_libs.patch
# PATCH-FIX-UPSTREAM
Patch4: sfml-1.6-underlinking.patch
# PATCH-FIX-UPSTREAM
Patch5: sfml-1.6-png.patch
# PATCH-FIX-UPSTREAM
Patch6: sfml-memcpy.patch
BuildRequires: Mesa-devel
BuildRequires: doxygen
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: glew-devel
%if 0%{?suse_version} > 1220
BuildRequires: glu-devel
%endif
BuildRequires: libSOIL-devel
BuildRequires: libjpeg-devel
%if 0%{?suse_version} <= 1220
BuildRequires: libopenal1
%endif
BuildRequires: libpng-devel
BuildRequires: libsndfile-devel
BuildRequires: libtool
BuildRequires: openal-soft-devel
BuildRequires: xorg-x11-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SFML is a portable and easy to use multimedia API written in C++. You can
see it as a modern, object-oriented alternative to SDL. SFML is composed of
several packages to perfectly suit your needs. You can use SFML as a
minimal windowing system to interface with OpenGL, or as a fully-featured
multimedia library for building games or interactive programs.
%package -n lib%{name}%{soname}
Summary: SFML library
Group: Development/Libraries/C and C++
%description -n lib%{name}%{soname}
SFML is a portable and easy to use multimedia API written in C++. You can
see it as a modern, object-oriented alternative to SDL. SFML is composed of
several packages to perfectly suit your needs. You can use SFML as a
minimal windowing system to interface with OpenGL, or as a fully-featured
multimedia library for building games or interactive programs.
%package devel
Summary: SFML development files
Group: Development/Libraries/C and C++
Requires: Mesa-devel
Requires: libsfml1_6 = %{version}
%description devel
Development files for SFML.
%prep
%setup -q -n sfml-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch6 -p1
rm -rf src/SFML/Graphics/GLEW
rm -rf src/SFML/Graphics/libjpeg
rm -rf src/SFML/Graphics/libpng
rm -rf src/SFML/Graphics/SOIL
rm -rf src/SFML/Graphics/zlib
rm -rf src/SFML/Window/glext
# fix line endings
find . -type f -not \( -name \*.gif -o -name \*.jpg -o -name \*.png -o -name \*.ttf -o -name \*.wav \) -exec sed -i "s|\r||" {} \;
# fix permissions
find . -type f -exec chmod -x {} \;
%build
make %{?_smp_mflags} DEBUGFLAGS="%{optflags} -DNDEBUG"
cd doc/build
doxygen
%install
make DESTDIR=%{buildroot}/usr DESTLIBDIR=%{buildroot}%{_libdir} install
%post -n lib%{name}%{soname} -p /sbin/ldconfig
%postun -n lib%{name}%{soname} -p /sbin/ldconfig
%files -n lib%{name}%{soname}
%defattr(-,root,root)
%doc license.txt
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root)
%doc doc/*.htm doc/html
%{_includedir}/SFML
%{_libdir}/lib*.so
%changelog