SHA256
1
0
forked from pool/qwt6

Accepting request 514649 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/514649
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qwt6?expand=0&rev=11
This commit is contained in:
Yuchen Lin 2017-08-12 18:25:41 +00:00 committed by Git OBS Bridge
parent f888bad143
commit e2bb0824b2
9 changed files with 587 additions and 79 deletions

87
qwt-6.1.3-mkspecs.patch Normal file
View File

@ -0,0 +1,87 @@
diff -ruN qwt-6.1.3.orig/qwtconfig.pri qwt-6.1.3/qwtconfig.pri
--- qwt-6.1.3.orig/qwtconfig.pri 2016-06-13 10:14:23.031601095 +0300
+++ qwt-6.1.3/qwtconfig.pri 2017-04-21 22:45:59.888743725 +0300
@@ -19,8 +19,7 @@
QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
unix {
- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
- # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
+ QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
}
win32 {
@@ -28,9 +27,9 @@
# QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION
}
-QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
-QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
-QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib
+QWT_INSTALL_DOCS = $$[QT_INSTALL_DOCS]/qwt6
+QWT_INSTALL_HEADERS = $$[QT_INSTALL_HEADERS]/qwt6
+QWT_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
######################################################################
# Designer plugin
@@ -41,15 +40,13 @@
# add $${QWT_INSTALL_PREFIX}/plugins to QT_PLUGIN_PATH in the
# runtime environment of designer/creator.
######################################################################
-
-QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer
-
# linux distributors often organize the Qt installation
# their way and QT_INSTALL_PREFIX doesn't offer a good
# path. Also QT_INSTALL_PREFIX is only one of the default
# search paths of the designer - not the Qt creator
+######################################################################
-#QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PREFIX]/plugins/designer
+QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PLUGINS]/designer
######################################################################
# Features
@@ -63,8 +60,7 @@
# with every Qt upgrade.
######################################################################
-QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
-# QWT_INSTALL_FEATURES = $$[QT_INSTALL_PREFIX]/features
+QWT_INSTALL_FEATURES = $$[QMAKE_MKSPECS]/features
######################################################################
# Build the static/shared libraries.
@@ -72,14 +68,14 @@
# it will be a static library.
######################################################################
-QWT_CONFIG += QwtDll
+QWT_CONFIG += QwtDll
######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot
# widget.
######################################################################
-QWT_CONFIG += QwtPlot
+QWT_CONFIG += QwtPlot
######################################################################
# QwtWidgets enables all classes, that are needed to use the all other
@@ -141,7 +137,7 @@
# Otherwise you have to build them from the examples directory.
######################################################################
-#QWT_CONFIG += QwtExamples
+QWT_CONFIG += QwtExamples
######################################################################
# The playground is primarily intended for the Qwt development
@@ -171,5 +167,5 @@
unix {
- #QWT_CONFIG += QwtPkgConfig
+ QWT_CONFIG += QwtPkgConfig
}

13
qwt-6.1.3-pkgconfig.patch Normal file
View File

@ -0,0 +1,13 @@
diff -ruN qwt-6.1.3.orig/textengines/mathml/mathml.pro qwt-6.1.3/textengines/mathml/mathml.pro
--- qwt-6.1.3.orig/textengines/mathml/mathml.pro 2016-06-13 10:14:22.990600268 +0300
+++ qwt-6.1.3/textengines/mathml/mathml.pro 2017-04-20 23:52:55.654701571 +0300
@@ -60,7 +60,8 @@
QMAKE_PKGCONFIG_LIBDIR = $${QWT_INSTALL_LIBS}
QMAKE_PKGCONFIG_INCDIR = $${QWT_INSTALL_HEADERS}
-
+ QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+
# QMAKE_PKGCONFIG_DESTDIR is buggy, in combination
# with including pri files: better don't use it

24
qwt-6.1.3-rpath.patch Normal file
View File

@ -0,0 +1,24 @@
diff -ruN qwt-6.1.3.orig/designer/designer.pro qwt-6.1.3/designer/designer.pro
--- qwt-6.1.3.orig/designer/designer.pro 2016-06-13 10:14:23.019600853 +0300
+++ qwt-6.1.3/designer/designer.pro 2017-04-21 02:01:26.358076198 +0300
@@ -83,7 +83,7 @@
# compile the path for finding the Qwt library
# into the plugin. Not supported on Windows !
- QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
+# QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
contains(QWT_CONFIG, QwtDll) {
diff -ruN qwt-6.1.3.orig/examples/examples.pri qwt-6.1.3/examples/examples.pri
--- qwt-6.1.3.orig/examples/examples.pri 2016-06-13 10:14:23.023600934 +0300
+++ qwt-6.1.3/examples/examples.pri 2017-04-21 02:01:43.778128834 +0300
@@ -34,7 +34,7 @@
}
}
-QMAKE_RPATHDIR *= $${QWT_OUT_ROOT}/lib
+#QMAKE_RPATHDIR *= $${QWT_OUT_ROOT}/lib
qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
greaterThan(QT_MAJOR_VERSION, 4) {

28
qwt-qt5.patch Normal file
View File

@ -0,0 +1,28 @@
diff -up qwt-6.1.2/qwtfunctions.pri.qt5 qwt-6.1.2/qwtfunctions.pri
--- qwt-6.1.2/qwtfunctions.pri.qt5 2014-12-11 08:13:13.511186492 -0600
+++ qwt-6.1.2/qwtfunctions.pri 2014-12-12 20:45:24.556261966 -0600
@@ -12,7 +12,12 @@
defineReplace(qwtLibraryTarget) {
unset(LIBRARY_NAME)
+
+ greaterThan(QT_MAJOR_VERSION, 4) {
+ LIBRARY_NAME = $${1}-qt$${QT_MAJOR_VERSION}
+ } else {
LIBRARY_NAME = $$1
+ }
mac:contains(QWT_CONFIG, QwtFramework) {
@@ -36,7 +41,11 @@ defineReplace(qwtLibraryTarget) {
defineTest(qwtAddLibrary) {
LIB_PATH = $$1
+ greaterThan(QT_MAJOR_VERSION, 4) {
+ LIB_NAME = $${2}-qt$${QT_MAJOR_VERSION}
+ } else {
LIB_NAME = $$2
+ }
mac:contains(QWT_CONFIG, QwtFramework) {

View File

@ -1,11 +0,0 @@
--- designer/designer.pro.orig 2013-08-09 18:24:58.656000009 +0300
+++ designer/designer.pro 2013-08-09 18:24:58.666000009 +0300
@@ -83,7 +83,7 @@
# compile the path for finding the Qwt library
# into the plugin. Not supported on Windows !
- QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
+# QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
contains(QWT_CONFIG, QwtDll) {

134
qwt6-qt5.changes Normal file
View File

@ -0,0 +1,134 @@
-------------------------------------------------------------------
Sat Aug 5 08:12:02 UTC 2017 - aloisio@gmx.com
- Fixed manpages conflict with qwt5
-------------------------------------------------------------------
Wed Jul 26 09:27:54 UTC 2017 - aloisio@gmx.com
- Remove _tmp manpages and rename the existing one to -qt5
pattern to avoid conflict with the qt4 package
- Dropped pre_checkin.sh
-------------------------------------------------------------------
Tue Jul 25 10:57:21 UTC 2017 - aloisio@gmx.com
- Remove _multibuild prior to Factory submission
-------------------------------------------------------------------
Tue May 30 08:58:23 UTC 2017 - aloisio@gmx.com
- Build qwt6-qt5 as separate package
* add qwt6-qt5.spec
* add qwt6-qt5.changes
* add qwt-qt5.patch
(thanks to awissu and other contributors of the KDE:Qt5 package)
- Refreshed qwt-rpath.patch as qwt-6.1.3-rpath.patch
- Create and install pc files for pkg-config:
* add qwt-6.1.3-pkgconfig.patch
- Use mkspecs directory
* add qwt-6.1.3-mkspecs.patch
- Use sover macro
- Build the examples modules
- Renamed the libqwt6 package as libqwt-qt%%sover
- Use license macro on openSUSE >= 42.2
- Add man page
- Added pre_checkin.sh to keep .changes files in sync
- Spec cleanup
-------------------------------------------------------------------
Thu Sep 29 06:03:11 UTC 2016 - aloisio@gmx.com
- Update to version 6.1.3
* QwtPlotMagnifier, QwtPlotZoomer: handling of non linear
transformations ( f.e logarithmic )
* Date/Time scales fixed
QwtDate::ceil(), QwtDate::weekNumber(), QwtDate::utcOffset()
QwtDateScaleEngine fixed when aligning to months
* QwtPlotLayout: layout bug for legends witdh visisble
scrollbars fixed
* Plot items
hiding QwtPlotLegendItem without entries
QwtPlotShapeItem render code fixed
* QwtPlotGLCanvas
slightly improved, nevertheless better use Qwt 6.2 when being
interested in OpenGL
* Other
QwtGraphic boundingRect updates fixed
QwtSyntheticPointData::x() fixed
QwtLogScaleEngine::divideScale ignoring stepSize parameter
for ranges below one "decade"
QwtPlotAbstractBarChart::getCanvasMarginHint fixed
- Fixed source URL
-------------------------------------------------------------------
Wed Feb 4 18:46:59 UTC 2015 - dap.darkness@gmail.com
- Update to Qwt 6.1.2
* fixes at QwtPlot, color maps, controls and scales.
- Removed Mandriva support.
- Renamed qwt-6.1.0-rpath.patch to qwt-rpath.patch
because upstream doesn't want merge it. Updated.
-------------------------------------------------------------------
Mon Aug 12 18:33:05 UTC 2013 - tittiatcoke@gmail.com
- qwt6-designer is now conflicting with qwt-designer.
-------------------------------------------------------------------
Fri Aug 9 15:36:51 UTC 2013 - dap.darkness@gmail.com
- Update to Qwt 6.1.0
* New plot items
* Scales beyond linear and logarithmic transformations
* Datetime scales
* Redesign of the dial and meter widgets
* Basic support for an OpenGL plot canvas
* A new system for plot legends
* Off-screen paint device for vector graphics
* Changes and improvements to several classes
- Added qwt-6.1.0-rpath.patch to prevent
https://sourceforge.net/p/qwt/bugs/191
- Qmake debug info stripping was disabled.
-------------------------------------------------------------------
Mon Jan 28 16:30:49 EET 2013 - koprok@nand.bg
- Update to Qwt 6.0.2
* qwtfunctions.pri added
* QwtPlotDict::detachItems fixed
* QwtWeedingCurveFitter::fitCurve performance improvements
* QwtDynGridLayout fixed for non widget items
* QwtInterval: avoid annoying compiler warning
* Autoscaling of curves without points fixed
* QwtPlotDirectPainter::drawSeries bad translation removed
* QwtPlotIntervalCurve: drawing of symbols fixed
* QwtPlotlayout: minor layout bufs fixed
* Usage of QwtPlotRasterItem::pixelHint fixed
* QwtPlotRenderer: several minor fixes
* QwtRasterData: CONREC algorithm fixed
* QwtThermo: layout code fixed
* QwtThermo: memory leak fixed
* QwtMmlDocument: compiler issues
* Logarithmic autoscaler fixed for intervals close below a decade
-------------------------------------------------------------------
Tue Nov 20 17:23:54 UTC 2012 - nico.kruber@gmail.com
- Fix the SLES build (%make_install is not expanded on SLES)
-------------------------------------------------------------------
Thu Mar 29 12:38:20 UTC 2012 - cfarrell@suse.com
- license update: SUSE-QWT-1.0
Added to spreadsheet linked at license.opensuse.org. Package warrants its
own license
-------------------------------------------------------------------
Wed Mar 28 08:57:52 UTC 2012 - idonmez@suse.com
- Initial release

188
qwt6-qt5.spec Normal file
View File

@ -0,0 +1,188 @@
#
# spec file for package qwt6-qt5
#
# Copyright (c) 2017 SUSE LINUX 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 sover 5-6
Name: qwt6-qt5
Version: 6.1.3
Release: 0
Summary: Qt5 Widgets for Technical Applications
License: SUSE-QWT-1.0
Group: Development/Libraries/C and C++
Url: https://qwt.sourceforge.net/
Source: https://sourceforge.net/projects/qwt/files/qwt/%{version}/qwt-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE to prevent 'ERROR: RPATH "/usr/local/qwt-6.1.0/lib" on
# /usr/lib(64)/qt(4,5)/plugins/designer/libqwt_designer_plugin.so is not allowed'.
Patch0: qwt-6.1.3-rpath.patch
# PATCH-FIX-OPENSUSE qt5.patch -- to get parallel-installable qt5 version.
Patch1: qwt-qt5.patch
# PATCH-FIX-OPENSUSE pkgconfig.patch -- Create and install pc files for pkg-config
Patch2: qwt-6.1.3-pkgconfig.patch
# PATCH-FIX-OPENSUSE mkspecs.patch -- Use established settings for the .pc files
Patch3: qwt-6.1.3-mkspecs.patch
BuildRequires: fdupes
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Designer)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(libpng)
%description
The Qwt(Qt5) 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.
%package -n libqwt-qt%{sover}
Summary: Shared library for Qt5 Widgets for Technical Applications
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libqwt-qt%{sover}
This package contains the shared library to run Technical Applications
developed with/for Qwt(Qt5).
%package devel
Summary: Include headers and Qt Designer plugin for Qwt(Qt5)
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: freetype2-devel
Requires: gcc-c++
Requires: pkgconfig(Qt5Concurrent)
Requires: pkgconfig(Qt5OpenGL)
Requires: pkgconfig(Qt5PrintSupport)
Requires: pkgconfig(Qt5Svg)
Requires: pkgconfig(Qt5Widgets)
Requires: pkgconfig(libpng)
Recommends: %{name}-designer
Recommends: %{name}-devel-doc
Recommends: %{name}-examples
Conflicts: otherproviders(qwt-qt5-devel)
Provides: qwt-qt5-devel = %{version}
%description devel
This package contains the header files of Qwt and its Qt designer plugin
in order to create Qt applications using the Qwt(Qt5) widgets.
%package examples
Summary: Example programs using Qwt(Qt5)
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%description examples
This package contains example programs demonstrating the Qwt(Qt5) widgets.
%package designer
Summary: Plugin for the Qt5 Interface designer
Group: Development/Tools/GUI Builders
Requires: %{name}-devel = %{version}
Conflicts: otherproviders(qwt-qt5-designer)
Provides: qwt-qt5-designer = %{version}
%description designer
The %{name}-designer package contains the plugin for the Qt5 User Interface
designer tool.
%package devel-doc
Summary: Development documentation for Qwt(Qt5)
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%description devel-doc
This package contains the development documentation of the Qwt(Qt5) widgets
as is it created by doxygen.
%prep
%setup -q -n qwt-%{version}
%patch0 -p1
%patch1 -p1 -b .qt5
%patch2 -p1
%patch3 -p1
# remove leftovers
rm -f doc/man/man3/_tmp_qwt*
# rename manpages
for f in doc/man/man3/*; do
qwt6name=$(echo $(basename ${f} .3)|sed \
'/^Qwt/{s/Qwt/Qwt6/;be;}; /^qwt/{s/qwt/qwt6/;be;}; s/$/_qwt6/; :e;')
mv -v ${f} doc/man/man3/${qwt6name}-qt5.3
done
%build
mkdir build
pushd build
%qmake5 ..
%make_jobs
popd
%install
pushd build
%qmake5_install
popd
# Qwt base examples
mkdir -p %{buildroot}%{%_libqt5_docdir}/qwt6
mkdir -p %{buildroot}%{_libqt5_examplesdir}/qwt6
cp -r examples %{buildroot}%{_libqt5_docdir}/qwt6/examples
cp -r build/examples/bin %{buildroot}%{_libqt5_examplesdir}/qwt6
mkdir -p %{buildroot}%{_mandir}
mv %{buildroot}%{_libqt5_docdir}/qwt6/man/man3 \
%{buildroot}%{_mandir}/
%fdupes %{buildroot}/%{_prefix}
%post -n libqwt-qt%{sover} -p /sbin/ldconfig
%postun -n libqwt-qt%{sover} -p /sbin/ldconfig
%files -n libqwt-qt%{sover}
%defattr(-,root,root)
%if 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420200
%license COPYING
%else
%doc COPYING
%endif
%{_libqt5_libdir}/libqwt-qt5.so.*
%files designer
%defattr(-,root,root)
%{_libqt5_plugindir}/designer/*.so
%files devel
%defattr(-,root,root)
%doc README
%{_libqt5_libdir}/libqwt-qt5.so
%{_libqt5_libdir}/pkgconfig/Qt5Qwt6.pc
%{_libqt5_archdatadir}/mkspecs/features/
%dir %{_libqt5_includedir}/qwt6
%{_libqt5_includedir}/qwt6/*.h
%{_mandir}/man?/*.?%{ext_info}
%files examples
%defattr(-,root,root)
%{_libqt5_examplesdir}/
%files devel-doc
%defattr(-,root,root)
%doc %{_libqt5_docdir}/
%changelog

View File

@ -1,3 +1,40 @@
-------------------------------------------------------------------
Sat Aug 5 08:11:17 UTC 2017 - aloisio@gmx.com
- Fixed manpages conflict with qwt5
-------------------------------------------------------------------
Wed Jul 26 09:27:22 UTC 2017 - aloisio@gmx.com
- Remove _tmp manpages
- Dropped pre_checkin.sh
-------------------------------------------------------------------
Tue Jul 25 10:57:21 UTC 2017 - aloisio@gmx.com
- Remove _multibuild prior to Factory submission
-------------------------------------------------------------------
Tue May 30 08:58:23 UTC 2017 - aloisio@gmx.com
- Build qwt6-qt5 as separate package
* add qwt6-qt5.spec
* add qwt6-qt5.changes
* add qwt-qt5.patch
(thanks to awissu and other contributors of the KDE:Qt5 package)
- Refreshed qwt-rpath.patch as qwt-6.1.3-rpath.patch
- Create and install pc files for pkg-config:
* add qwt-6.1.3-pkgconfig.patch
- Use mkspecs directory
* add qwt-6.1.3-mkspecs.patch
- Use sover macro
- Build the examples modules
- Renamed the libqwt6 package as libqwt-qt%%sover
- Use license macro on openSUSE >= 42.2
- Add man page
- Added pre_checkin.sh to keep .changes files in sync
- Spec cleanup
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Sep 29 06:03:11 UTC 2016 - aloisio@gmx.com Thu Sep 29 06:03:11 UTC 2016 - aloisio@gmx.com

144
qwt6.spec
View File

@ -1,7 +1,7 @@
# #
# spec file for package qwt6 # spec file for package qwt6
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,7 @@
# #
%define sover 6
Name: qwt6 Name: qwt6
Version: 6.1.3 Version: 6.1.3
Release: 0 Release: 0
@ -26,32 +27,35 @@ Url: http://qwt.sourceforge.net/
Source: https://sourceforge.net/projects/qwt/files/qwt/%{version}/qwt-%{version}.tar.bz2 Source: https://sourceforge.net/projects/qwt/files/qwt/%{version}/qwt-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE to prevent 'ERROR: RPATH "/usr/local/qwt-6.1.0/lib" on # PATCH-FIX-OPENSUSE to prevent 'ERROR: RPATH "/usr/local/qwt-6.1.0/lib" on
# /usr/lib(64)/qt4/plugins/designer/libqwt_designer_plugin.so is not allowed'. # /usr/lib(64)/qt4/plugins/designer/libqwt_designer_plugin.so is not allowed'.
Patch0: qwt-rpath.patch Patch0: qwt-6.1.3-rpath.patch
# PATCH-FIX-OPENSUSE pkgconfig.patch -- Create and install pc files for pkg-config
Patch1: qwt-6.1.3-pkgconfig.patch
# PATCH-FIX-OPENSUSE mkspecs.patch -- Use established settings for the .pc files
Patch2: qwt-6.1.3-mkspecs.patch
BuildRequires: fdupes
BuildRequires: freetype2-devel BuildRequires: freetype2-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libpng-devel BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: qt-devel BuildRequires: qt-devel
%if 0%{?suse_version} >= 1100 BuildRequires: pkgconfig(libpng)
BuildRequires: fdupes BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
Requires: libqwt6 = %{version}
%description %description
The Qwt library contains GUI Components and utility classes which are The Qwt(Qt4) library contains GUI Components and utility classes which are
primarily useful for programs with a technical background. Beside a 2D primarily useful for programs with a technical background. Beside a 2D
plot widget it provides scales, sliders, dials, compasses, thermometers, plot widget it provides scales, sliders, dials, compasses, thermometers,
wheels and knobs to control or display values, arrays, or ranges of type wheels and knobs to control or display values, arrays, or ranges of type
double. double.
%package -n libqwt6 %package -n libqwt%{sover}
Summary: Shared library for Qt Widgets Summary: Shared library for Qt4 Widgets
Group: Development/Libraries/C and C++ Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libqwt6 %description -n libqwt%{sover}
This package contains the shared library to run Technical Applications This package contains the shared library to run Technical Applications
developed with/for Qwt. developed with/for Qwt(Qt4).
%package devel %package devel
Summary: Include headers and Qt Designer plugin for Qwt Summary: Include headers and Qt Designer plugin for Qwt
@ -59,17 +63,17 @@ Group: Development/Libraries/C and C++
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: freetype2-devel Requires: freetype2-devel
Requires: gcc-c++ Requires: gcc-c++
Requires: libpng-devel
Requires: qt-devel Requires: qt-devel
Requires: pkgconfig(libpng)
Conflicts: qwt-devel
%if 0%{?suse_version} %if 0%{?suse_version}
Recommends: %{name}-devel-doc Recommends: %{name}-devel-doc
Recommends: %{name}-examples Recommends: %{name}-examples
%endif %endif
Conflicts: qwt-devel
%description devel %description devel
This package contains the header files of Qwt and its Qt designer plugin This package contains the header files of Qwt and its Qt designer plugin
in order to create Qt applications using the Qwt widgets. in order to create Qt applications using the Qwt(qt4) widgets.
%package examples %package examples
Summary: Example programs using Qwt Summary: Example programs using Qwt
@ -82,16 +86,15 @@ This package contains example programs demonstrating the Qwt widgets.
%package designer %package designer
Summary: Plugin for the Qt Interface designer Summary: Plugin for the Qt Interface designer
Group: Development/Tools/GUI Builders Group: Development/Tools/GUI Builders
Conflicts: qwt-designer
Requires: %{name}-devel = %{version} Requires: %{name}-devel = %{version}
Requires: qt-devel Conflicts: qwt-designer
%description designer %description designer
The %{name}-designer package contains the plugin for the Qt User Interface The %{name}-designer package contains the plugin for the Qt4 User Interface
designer tool. designer tool.
%package devel-doc %package devel-doc
Summary: Development documentation for Qwt Summary: Development documentation for Qwt(Qt4)
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version} Requires: %{name}-devel = %{version}
@ -101,75 +104,80 @@ as is it created by doxygen.
%prep %prep
%setup -q -n qwt-%{version} %setup -q -n qwt-%{version}
%patch0 %patch0 -p1
%patch1 -p1
%patch2 -p1
# remove leftovers
rm -f doc/man/man3/_tmp_qwt*
# rename manpages
for f in doc/man/man3/*; do
qwt6name=$(echo $(basename ${f} .3)|sed \
'/^Qwt/{s/Qwt/Qwt6/;be;}; /^qwt/{s/qwt/qwt6/;be;}; s/$/_qwt6/; :e;')
mv -v ${f} doc/man/man3/${qwt6name}.3
done
%build %build
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} mkdir build
export PATH=%{_libdir}/qt4/bin/:$PATH pushd build
%endif qmake .. \
# Now build the qwt6 library
qmake \
QMAKE_STRIP="" \ QMAKE_STRIP="" \
QWT_INSTALL_PREFIX=%{_prefix} \ QMAKE_CXXFLAGS="%{optflags}"
CONFIG+=QwtDll CONFIG+=QwtDesigner CONFIG+=QwtExamples -after \
QMAKE_CXXFLAGS="%{optflags}" \
target.path=%{_libdir} \
headers.path=%{_includedir}/%{name} \
qwtspec.path=%{_datadir}/%{name}/features \
qwtmathmlspec.path=%{_datadir}/%{name}/features \
doc.path=%{_docdir}/%{name}-devel-doc
make %{?_smp_mflags} make V=1 %{?_smp_mflags}
popd
%install %install
make DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot} pushd build
make V=1 DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot}
popd
# Documentation # Qwt base examples
mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_libdir}/%{name}
cp COPYING README %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_docdir}/libqt4/%{name}
cp -r examples %{buildroot}%{_docdir}/%{name}/examples cp -r examples %{buildroot}%{_docdir}/libqt4/%{name}/examples
cp -r build/examples/bin %{buildroot}%{_libdir}/%{name}/examples
# Designer plugin mkdir -p %{buildroot}%{_mandir}
mkdir -p %{buildroot}/%{_libdir}/qt4/plugins/designer mv %{buildroot}%{_docdir}/libqt4/qwt6/man/man3 \
mv -v %{buildroot}/%{_libdir}/libqwt_designer_plugin.so %{buildroot}/%{_libdir}/qt4/plugins/designer/ %{buildroot}%{_mandir}/
%if 0%{?suse_version} >= 1100 %fdupes %{buildroot}/%{_prefix}
%fdupes %{buildroot}
%post -n libqwt%{sover} -p /sbin/ldconfig
%postun -n libqwt%{sover} -p /sbin/ldconfig
%files -n libqwt%{sover}
%defattr(-,root,root)
%if 0%{?suse_version} > 1320 || 0%{?leap_version} >= 420200
%license COPYING
%else
%doc COPYING
%endif %endif
%{_libdir}/libqwt.so.*
%post -n libqwt6 -p /sbin/ldconfig
%postun -n libqwt6 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%exclude %{_docdir}/%{name}/examples
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/*
%files -n libqwt6
%defattr(-,root,root)
%{_libdir}/libqwt*
%exclude %{_libdir}/libqwt*.so
%files designer %files designer
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/qt4/plugins/designer/libqwt_designer_plugin.so %{_libdir}/qt4/plugins/designer/*.so
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libqwt*.so %doc README
%{_libdir}/libqwt.so
%{_libdir}/pkgconfig/qwt.pc
%dir %{_includedir}/%{name} %dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h %{_includedir}/%{name}/*.h
%{_datadir}/%{name} %{_datadir}/qt4/mkspecs/features/
%{_mandir}/man?/*.?%{ext_info}
%files examples %files examples
%defattr(-,root,root) %defattr(-,root,root)
%doc %{_docdir}/%{name}/examples %dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/examples
%{_libdir}/%{name}/examples/
%files devel-doc %files devel-doc
%defattr(-,root,root) %defattr(-,root,root)
%doc %{_docdir}/%{name}-devel-doc %dir %{_docdir}/libqt4/%{name}
%doc %{_docdir}/libqt4/%{name}/
%changelog %changelog