Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > d4c22c690bc211fcac9fe604c9e41645 > files > 4

libQGLViewer-2.3.6-1.fc14.src.rpm

Name:           libQGLViewer
Version:        2.3.6
Release:        1%{?dist}
Summary:        Qt based OpenGL generic 3D viewer library

Group:          System Environment/Libraries
License:        GPLv2 with exceptions or GPLv3 with exceptions 
URL:            http://www.libqglviewer.com/index.html
Source0:        http://www.libqglviewer.com/src/%{name}-%{version}.tar.gz

# QGLViewer/VRender/gpc.cpp uses exit(0) to "abort" from a failure of malloc
# Use abort() instead.
Patch0:         libQGLViewer-2.3.1-exit.patch

# libQGLViewer .pro files explicitely remove "-g" from compile flags. Make
# them back.
Patch1:         libQGLViewer-2.3.6-dbg.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  qt4-devel

%description
%{name} is a C++ library based on Qt that eases the creation of OpenGL
3D viewers. It provides some of the typical 3D viewer functionalities, such
as the possibility to move the camera using the mouse, which lacks in most
of the other APIs. Other features include mouse manipulated frames,
interpolated keyFrames, object selection, stereo display, screenshot saving
and much more. It can be used by OpenGL beginners as well as to create
complex applications, being fully customizable and easy to extend.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       qt4-devel

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package doc
Summary: API documentation, demos and example programs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
%{summary}.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .exit
%patch1 -p1 -b dbg

# Fix the encoding of several files, so that they all use utf-8.
for f in doc/*.html doc/examples/*.html \
        examples/contribs/terrain/quadtree.cpp \
        examples/contribs/terrain/viewer.cpp \
        examples/contribs/quarto/piece.cpp \
        examples/contribs/dvonn/dvonnwindowimpl.cpp \
        examples/luxo/luxo.cpp \
        examples/contribs/quarto/jeu.cpp \
        examples/contribs/terrain/terrain.cpp \
        examples/contribs/quarto/rules.txt;
do
  cp -a $f $f.bak
  rm -f $f
  sed -e 's/charset=iso-8859-1/charset=utf-8/' < $f.bak | iconv -f l1 -t utf8 > $f;
  touch -r $f.bak $f
  rm -f $f.bak
done

%build
cd QGLViewer
%{_qt4_qmake} \
          LIB_DIR=%{_libdir} \
          DOC_DIR=%{_defaultdocdir}/%{name}-%{version} \
          INCLUDE_DIR=%{_includedir} \
          TARGET_x=%{name}.so.%{version}
# The TARGET_x variable gives the SONAME. However, qmake behavior is not
# correct when the SONAME is customized: it create wrong symbolic links
# that must be cleaned after the installation.

make %{?_smp_mflags}

cd ../designerPlugin
%{_qt4_qmake} LIB_DIR=../QGLViewer
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
cd QGLViewer
make -f Makefile -e INSTALL_ROOT=$RPM_BUILD_ROOT install_target install_include
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer.prl

# Clean symbolic links
rm $RPM_BUILD_ROOT%{_libdir}/libQGLViewer.so.?.? \
   $RPM_BUILD_ROOT%{_libdir}/libQGLViewer.so.%{version}\\*

cd ../designerPlugin
make -e INSTALL_ROOT=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README LICENCE CHANGELOG GPL_EXCEPTION
%{_libdir}/libQGLViewer.so.%{version}

%files devel
%defattr(-,root,root,-)
%{_includedir}/QGLViewer/
%{_libdir}/libQGLViewer.so
%{_qt4_plugindir}/designer/libqglviewerplugin.so

%files doc
%defattr(-,root,root,-)
%doc doc
%doc examples

%changelog
* Fri Jul  2 2010 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.6-1
- New upstream release
- Fix an incorrect changelog entry

* Wed Apr 21 2010 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.5-2
- Tweak the configuration and compilation so that the soname of the library is
  equal to its soversion. The binary compilatibility is not ensured by 
  upstream.

* Tue Apr 20 2010 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.5-1
- New upstream release
- Rebase the dbg patch

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jun 24 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-9
- noarch -doc subpackage.

* Wed Apr  1 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-8
- Add a patch, so that "-g" flags are not removed.

* Mon Mar 30 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-7
- Remove glibc-common from BR:

* Tue Jan  6 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-6
- Merge the subpackage -designer-plugin into -devel.
- Add Requires: qt4-devel to -devel.

* Tue Jan  6 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-5
- Correct License: tag.

* Tue Jan  6 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-4
- Add the file GPL_EXCEPTION to docs.

* Tue Jan  6 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-3
- Untabify the spec file.

* Tue Jan  6 2009 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-2
- Update the URL.
- Add a patch that change exit(0) to abort() in QGLViewer/VRender/gpc.cpp.
- Use macros %%{_qt4_qmake} and %%{_qt4_plugindir} from /etc/rpm/macros.qt4
- Remove %%{_libdir}/libQGLViewer.prl (useless, and rpmlint outputs an
  error about it in %%{_libdir}

* Wed Dec 17 2008 Laurent Rineau <Laurent.Rineau__fedora@normalesup.org> - 2.3.1-1
- New release.

* Tue Oct 23 2007 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 2.2.6-2
- Add examples in %%{name}-doc

* Tue Oct 23 2007 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 2.2.6-1
- New upstream release.

* Tue Apr  3 2007 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 2.2.5-2
- Add the designer-plugin sub-package.

* Mon Jan 29 2007 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 2.2.5-1
- First release to be submitted to Fedora.