LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qwt.spec of Package qwt (Project home:nandcd:11.4)

#
# spec file for package qwt (Version 5.2.1)
#
# Copyright (c) 2010 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/
#

# norootforbuild

Name:           qwt
Summary:        Qt Widgets for Technical Applications
Version:        5.2.1
Release:        1
License:        Qwt License 1.0
Group:          Development/Libraries/C and C++
Url:            http://qwt.sourceforge.net/
Source:         http://switch.dl.sourceforge.net/sourceforge/qwt/qwt-5.2.1.tar.bz2
Source2:        %{name}-rpmlintrc
Patch0:         enable-svg.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  freetype2-devel gcc-c++ libpng-devel

%if 0%{?mandriva_version} || 0%{?mdkversion}
BuildRequires:  libqt-devel
%else
BuildRequires:  qt-devel
%endif

%if 0%{?suse_version} >= 1100
BuildRequires:  fdupes
%endif

Requires:       libqwt5 = %{version}


%description
The Qwt library contains GUI Components and utility classes which are
primarily useful for programs with a technical background. Beside a 2D
plot widget it provides scales, sliders, dials, compasses, thermometers,
wheels and knobs to control or display values, arrays, or ranges of type
double.

Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )


%package -n libqwt5
Summary:        Shared library for Qt Widgets
Group:          Development/Libraries/C and C++

%description -n libqwt5
This package contains the shared library to run Technical Applications
developed with/for Qwt.

Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )


%package devel
Summary:        Include headers and Qt Designer plugin for Qwt
Group:          Development/Libraries/C and C++
Obsoletes:      libqwt5-devel < 5.2.1
Requires:       %{name} = %{version}-%{release}
Requires:       freetype2-devel gcc-c++ libpng-devel
%if 0%{?mandriva_version} || 0%{?mdkversion}
Requires:       libqt-devel
%else
Requires:       qt-devel
%endif
%if 0%{?suse_version}
Recommends:     %{name}-devel-doc
Recommends:     %{name}-examples
%endif
Provides:       libqwt5-devel = %{version}-%{release}

%description devel
This package contains the header files of Qwt and its Qt designer plugin
in order to create Qt applications using the Qwt widgets.


Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )

%package examples
Summary:        Example programs using Qwt
Group:          Development/Libraries/C and C++
Obsoletes:      libqwt5-examples < 5.2.1
Requires:       %{name}-devel = %{version}
Provides:       libqwt5-examples = %{version}-%{release}

%description examples
This package contains example programs demonstrating the Qwt widgets.


Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )

%package designer
Summary:       Plugin for the Qt Interface designer
Group:         Development/Tools
Requires:      %{name}-devel = %{version}-%{release}
%if 0%{?mandriva_version} || 0%{?mdkversion}
Requires:      libqt-devel
%else
Requires:       qt-devel
%endif

%description designer
The %{name}-designer package contains the plugin for the Qt User Interface
designer tool.


Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )

%package devel-doc
Summary:        Development documentation for Qwt
Group:          Development/Libraries/C and C++
Obsoletes:      libqwt5-devel-doc < 5.2.1
Requires:       %{name}-devel = %{version}
Provides:       libqwt5-devel-doc = %{version}-%{release}

%description devel-doc
This package contains the development documentation of the Qwt widgets
as is it created by doxygen.


Authors:
--------
  Uwe Rathmann
  Josef Wilgen ( <= Qwt 0.2 )

%prep
%setup -q -n %{name}-%{version}
%patch0 -p0

%build
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
export PATH=%{_libdir}/qt4/bin/:$PATH
%endif
%if 0%{?mandriva_version} == 2008 || 0%{?mdkversion} == 200800
export PATH=/usr/lib/qt4/bin/:$PATH
%endif

# Now build the qwt5 library
qmake \
	INSTALLBASE=%{_prefix} \
	CONFIG+=QwtDll CONFIG+=QwtDesigner CONFIG+=QwtExamples -after \
	QMAKE_CXXFLAGS="%optflags" \
	target.path=%{_libdir} \
	headers.path=%{_includedir}/%{name} \
	doc.path=%{_docdir}/%{name}-devel-doc

%__make %{?jobs:-j%jobs}


%install
%makeinstall INSTALL_ROOT=%buildroot
# man
%__mkdir -p %{buildroot}/%{_mandir}
%__mv -v %{buildroot}/%{_docdir}/%{name}-devel-doc/man/man3 %{buildroot}/%{_mandir}/
# docu
%__mkdir -p %{buildroot}%{_docdir}/%{name}/
%__mv -v COPYING CHANGES README examples %{buildroot}%{_docdir}/%{name}/
# designer plugin
%if 0%{?mandriva_version} == 2008 || 0%{?mdkversion} == 200800
%__mkdir -p %{buildroot}/%{_prefix}/lib/qt4/plugins/designer
%__mv -v %{buildroot}/%{_libdir}/libqwt_designer_plugin.so %{buildroot}/%{_prefix}/lib/qt4/plugins/designer/
%else
%__mkdir -p %{buildroot}/%{_libdir}/qt4/plugins/designer
%__mv -v %{buildroot}/%{_libdir}/libqwt_designer_plugin.so %{buildroot}/%{_libdir}/qt4/plugins/designer/
%endif
%if 0%{?suse_version} >= 1100
%fdupes %{buildroot}
%endif

%post -n libqwt5 -p /sbin/ldconfig

%postun -n libqwt5 -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/CHANGES
%doc %{_docdir}/%{name}/README

%files -n libqwt5
%defattr(-,root,root)
%{_libdir}/libqwt*
%exclude %{_libdir}/libqwt*.so

%files designer
%defattr(-,root,root)
%if 0%{?mandriva_version} == 2008 || 0%{?mdkversion} == 200800
%{_prefix}/lib/qt4/plugins/designer/libqwt_designer_plugin.so
%else
%{_libdir}/qt4/plugins/designer/libqwt_designer_plugin.so
%endif

%files devel
%defattr(-,root,root)
%{_libdir}/libqwt*.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_mandir}/man3/*

%files examples
%defattr(-,root,root)
%doc %{_docdir}/%{name}/examples

%files devel-doc
%defattr(-,root,root)
%doc %{_docdir}/%{name}-devel-doc


%changelog