File plib.spec of Package plib

#
# spec file for package plib
#
# 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/
#


Name:           plib
Version:        1.8.5
Release:        0
Summary:        A collection of useful Game libraries
License:        LGPL-2.1+
Group:          System/Libraries
Url:            http://plib.sourceforge.net/
Source:         %{name}-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         %{name}-%{version}-shared.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         %{name}-%{version}-intptr_t.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         %{name}-%{version}-strncat.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch3:         plib-1.8.5-commit2136-segfault.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch4:         plib-1.8.5-commit2139-slider.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch5:         plib-1.8.5-commit2140-slider.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch6:         plib-1.8.5-commit2154-segfault.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch7:         plib-1.8.5-CVE-2011-4620.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch8:         plib-1.8.5-CVE-2012-4552.patch
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
%if 0%{?suse_version} > 1230
BuildRequires:  libXi-devel
BuildRequires:  libXmu-devel
%endif
BuildRequires:  libdrm-devel
BuildRequires:  libtool
BuildRequires:  xorg-x11
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Plib contains a selection of libraries, that can be helpful for 3D game
programming. It contains the following libraries:
o JS  - A Joystick interface
o PUI - A simple GUI built on top of OpenGL
o SG  - Some Standard Geometry functions
o SL  - A Games-oriented Sound Library
o SSG - A Simple Scene Graph API built on top of OpenGL

%package devel
Summary:        A collection of useful Game libraries
Group:          System/Libraries
Requires:       Mesa
Requires:       glibc-devel
Requires:       plib = %{version}
Requires:       xorg-x11-devel

%description devel
Plib contains a selection of libraries, that can be helpful for 3D game
programming. It contains the following libraries:
o JS - A Joystick interface.
o PUI - A simple GUI built on top of OpenGL
o SG - Some Standard Geometry functions
o SL - A Games-oriented Sound Library
o SSG - A Simple Scene Graph API built on top of OpenGL

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8

%build
autoreconf -fiv
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%configure --disable-static --with-pic
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog KNOWN_BUGS
%doc NOTICE README README.GLUT TODO-1.6 TODO-2.0 TODO_AFTER135
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/plib
%{_libdir}/*.so

%changelog