A new user interface for you! Read more...

File qwtplot3d.spec of Package qwtplot3d

#
# spec file for package qwtplot3d
#
# 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		0
Name:           qwtplot3d
Version:        0.2.7
Release:        0
Summary:        A feature-rich Qt/OpenGL-based C++ programming library
License:        Zlib
Group:          Development/Libraries/C and C++
Url:            http://qwtplot3d.sourceforge.net/
Source0:        qwtplot3d-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         qwtplot3d-gcc43.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         glu_include.patch
BuildRequires:  Mesa-devel
BuildRequires:  dos2unix
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(zlib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++
programming library. It provides essentially a bunch of 3D-widgets
for programmers. The library is zlib licensed.

%package -n lib%{name}%{soname}
Summary:        Development tools for programs which uses QwtPlot3D Widget set
Group:          Development/Libraries/C and C++

%description -n lib%{name}%{soname}
QwtPlot3D is not a program, but a feature-rich Qt/OpenGL-based C++
programming library. It provides essentially a bunch of 3D-widgets
for programmers. The library is zlib licensed.

%package devel
Summary:        Development tools for programs which uses QwtPlot3D Widget set
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{soname} = %{version}
Requires:       pkgconfig(QtCore)

%description devel
QwtPlot3D is a feature-rich Qt/OpenGL-based C++ programming library.
It provides essentially a bunch of 3D-widgets for programmers.

#Build Static lib for GoldenCheetah
%package devel-static
Summary:        Development tools for programs which uses QwtPlot3D Widget set - static library
Group:          Development/Libraries/C and C++
Requires:       %{name}-devel = %{version}

%description devel-static
QwtPlot3D is a feature-rich Qt/OpenGL-based C++ programming library.
It provides essentially a bunch of 3D-widgets for programmers.

%prep
%setup -q -n qwtplot3d
%patch0 -p1
%patch1 -p0
dos2unix COPYING
find examples -type f -exec dos2unix {} \;

%build
cat > .qmake.cache <<EOF
CONFIG += staticlib
QMAKE_CFLAGS += %{optflags}
QMAKE_CXXFLAGS += %{optflags}
EOF
qmake-qt5 qwtplot3d.pro -o Makefile
make %{?_smp_mflags}
rm .qmake.cache
cat > .qmake.cache <<EOF
QMAKE_CFLAGS += %{optflags}
QMAKE_CXXFLAGS += %{optflags}
EOF
qmake-qt5 qwtplot3d.pro -o Makefile
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_includedir}/qwtplot3d
mkdir -p %{buildroot}%{_libdir}
for n in include/*.h ; do
    install -m 644 $n %{buildroot}%{_includedir}/qwtplot3d
done
# install, preserving links
chmod 644 lib/libqwtplot3d.so*
for n in lib/libqwtplot3d.so* ; do
    cp -d $n %{buildroot}%{_libdir}
done
install -m0644 lib/libqwtplot3d.a %{buildroot}%{_libdir}/libqwtplot3d.a

%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 COPYING
%{_libdir}/lib%{name}.so.*

%files devel
%defattr(-,root,root)
%doc COPYING examples
%{_libdir}/lib%{name}.so
%dir %{_includedir}/qwtplot3d
%{_includedir}/qwtplot3d/qwt3d*.h

%files devel-static
%defattr(-,root,root)
%{_libdir}/lib%{name}.a

%changelog