File plib.spec of Package plib

#
# spec file for package plib
#
# Copyright (c) 2012 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
BuildRequires:  freeglut-devel
BuildRequires:  gcc-c++
BuildRequires:  libdrm-devel
BuildRequires:  libtool
BuildRequires:  xorg-x11
Version:        1.8.5
Release:        0
Url:            http://plib.sourceforge.net/
Summary:        A collection of useful Game libraries
License:        LGPL-2.1+
Group:          System/Libraries
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-shared.patch
Patch1:         %{name}-%{version}-intptr_t.patch
Patch2:         %{name}-%{version}-strncat.patch
Patch3:         plib-1.8.5-commit2136-segfault.patch
Patch4:         plib-1.8.5-commit2139-slider.patch
Patch5:         plib-1.8.5-commit2140-slider.patch
Patch6:         plib-1.8.5-commit2154-segfault.patch
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
Requires:       plib = %{version}
Summary:        A collection of useful Game libraries
Group:          System/Libraries
Requires:       Mesa
Requires:       glibc-devel
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

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

%install
make DESTDIR=$RPM_BUILD_ROOT 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