File libGLw.spec of Package libGLw

#
# spec file for package libGLw
#
# 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:           libGLw
%if 0%{?suse_version} > 1210
%if 0%{?suse_version} < 1230
%define use_motif 0
%endif
%endif
%if 0%{?use_motif} > 0
%define lname	libGLwM1
BuildRequires:  openmotif-devel
%else
%define lname	libGLw1
%endif
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(dri)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xt)
Url:            http://www.mesa3d.org
Provides:       Mesa:%{_libdir}/libGLw.so.1
Version:        7.11.2
Release:        0
%define orgversion 1.0.0
%define date	20120320
%define sha1	4d1acb3
Summary:        Xt/Motif OpenGL drawing area widget library
License:        MIT
Group:          Development/Libraries/C and C++
Source:         glw-%{orgversion}_%{date}_%{sha1}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Xt/Motif OpenGL drawing area widget library shipped by the Mesa Project.



Authors:
--------
    Brian Paul

%package -n %lname
Summary:        Xt/Motif OpenGL drawing area widget library
Group:          System/Libraries
# O/P added in 12.2
Provides:       GLw1 = %version-%release
Provides:       MesaGLw = %version-%release
Obsoletes:      MesaGLw < %version-%release
%if 0%{?use_motif} > 0
Provides:       libGLw1 = %version-%release
Obsoletes:      libGLw1 < %version-%release
%endif

%description -n %lname
Xt/Motif OpenGL drawing area widget library shipped by the Mesa Project.

%package devel
%if 0%{?use_motif} > 0
Requires:       libGLwM1 = %version
%else
Requires:       libGLw1 = %version
%endif
Requires:       pkgconfig(gl)
Summary:        Libraries, includes and more to develop MesaGLw applications
Group:          Development/Libraries/C and C++
Provides:       Mesa-devel:%{_libdir}/libGLw.so

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Brian Paul

%prep
%setup -q -n glw-%{orgversion}

%build
%if 0%{?use_motif} > 0
%configure --enable-motif
%else
%configure
%endif
make %{?_smp_mflags} OPT_FLAGS="$RPM_OPT_FLAGS"

%install
mkdir -p $RPM_BUILD_ROOT%{_libdir} \
         $RPM_BUILD_ROOT/usr/include/GL
cp -a .libs/libGLw.so* $RPM_BUILD_ROOT%{_libdir}
install -m 644 *.h $RPM_BUILD_ROOT/usr/include/GL

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%doc README
%{_libdir}/libGLw.so.1*

%files devel
%defattr(-,root,root)
/usr/include/GL
%{_libdir}/libGLw.so

%changelog
openSUSE Build Service is sponsored by