[packages/qwt] - updated to 5.2.3 - added install patch, use make install

qboosh qboosh at pld-linux.org
Sun Dec 30 13:41:38 CET 2018


commit 8206b599d7948d95f4fdb7373bbbc68cd4cdfbf1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 30 13:46:24 2018 +0100

    - updated to 5.2.3
    - added install patch, use make install

 qwt-install.patch |  29 ++++++++++++++
 qwt.spec          | 114 ++++++++++++++++++++++++++++--------------------------
 2 files changed, 89 insertions(+), 54 deletions(-)
---
diff --git a/qwt.spec b/qwt.spec
index 0b40c9c..63ede78 100644
--- a/qwt.spec
+++ b/qwt.spec
@@ -1,25 +1,22 @@
-# TODO:
-# - fix build without qwt-devel:
-# x86_64-pld-linux-g++ ... libqwt_designer_plugin.so ... -L../lib
-#   -lqwt -lQtScript -lQtXml -lQtGui -lQtCore -lQtDesigner -lpthread
-# /usr/bin/ld: cannot find -lqwt
 Summary:	2D plotting widget extension to the Qt GUI
 Summary(pl.UTF-8):	Rozszerzenie wykresów 2D dla GUI Qt
 Name:		qwt
-Version:	5.2.1
-Release:	3
+Version:	5.2.3
+Release:	1
 License:	Qwt v1.0
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/qwt/%{name}-%{version}.tar.bz2
-# Source0-md5:	4a595b8db0ec3856b117836c1d60cb27
+# Source0-md5:	7d37a11d02bc7d095d0ca6427ec97b8d
+Patch0:		%{name}-install.patch
 URL:		http://qwt.sourceforge.net/
-BuildRequires:	QtCore-devel
-BuildRequires:	QtDesigner-devel
-BuildRequires:	QtGui-devel
-BuildRequires:	QtScript-devel
-BuildRequires:	QtSvg-devel
-BuildRequires:	qt4-build
-BuildRequires:	qt4-qmake >= 4.3.3-3
+BuildRequires:	QtCore-devel >= 4.5
+BuildRequires:	QtDesigner-devel >= 4.5
+BuildRequires:	QtGui-devel >= 4.5
+BuildRequires:	QtScript-devel >= 4.5
+BuildRequires:	QtSvg-devel >= 4.5
+BuildRequires:	QtXml-devel >= 4.5
+BuildRequires:	qt4-build >= 4.5
+BuildRequires:	qt4-qmake >= 4.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -35,70 +32,76 @@ technicznych i naukowych. Zawiera widget do rysowania wykresów 2D,
 różne rodzaje suwaków i wiele więcej.
 
 %package devel
-Summary:	Header files for qwt library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki qwt
+Summary:	Header files for Qwt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Qwt
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	QtGui-devel
+Requires:	QtCore-devel >= 4.5
+Requires:	QtGui-devel >= 4.5
 
 %description devel
-Header files for qwt library.
+Header files for Qwt library.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki qwt.
+Pliki nagłówkowe biblioteki Qwt.
 
-%package -n qt4-plugin-qwt
+%package apidocs
+Summary:	API documentation for Qwt library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki Qwt
+Group:		Documentation
+
+%description apidocs
+API documentation for Qwt library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Qwt.
+
+%package -n QtDesigner-plugin-qwt
 Summary:	qwt plugin for Qt Designer
 Summary(pl.UTF-8):	Wtyczka qwt dla Qt Designera
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	QtDesigner
+Requires:	QtDesigner >= 4.5
+Obsoletes:	qt4-plugin-qwt
 
-%description -n qt4-plugin-qwt
+%description -n QtDesigner-plugin-qwt
 qwt plugin for Qt Designer.
 
-%description -n qt4-plugin-qwt -l pl.UTF-8
+%description -n QtDesigner-plugin-qwt -l pl.UTF-8
 Wtyczka qwt dla Qt Designera.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-qmake-qt4 qwt.pro
+qmake-qt4 qwt.pro \
+	INSTALLBASE=%{_prefix} \
+	DOCDIR=%{_docdir} \
+	LIBDIR=%{_libdir} \
+	INCDIR=%{_includedir}/qwt \
+	QMAKE_CXX="%{__cxx}" \
+	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+	QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
 
-%{__make} -j1 \
-	CC="%{__cc}" \
-	CXX="%{__cxx}"
-
-### can't build without qwt-devel ver 5.1.0 installed
-#cd examples
-#qmake-qt4 examples.pro
-#%{__make} -j1
-#%{__make} distclean
-#rm -fr .*.cache */.*.cache */*/.*.cache Makefile */moc */obj */*/moc */*/obj
-#cd ..
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir}/qt4/plugins-mt/designer,%{_mandir}/man3}
-
-for n in src/*.h; do
-	cp -p $n $RPM_BUILD_ROOT%{_includedir}/%{name}
-done
 
-for n in lib/libqwt.so*; do
-	cp -d $n $RPM_BUILD_ROOT%{_libdir}
-done
-
-%{__make} -C designer install \
+%{__make} install \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT%{_mandir}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/man/man3 $RPM_BUILD_ROOT%{_mandir}
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
+
 # pointless link
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libqwt.so.?.?
 
-for n in doc/man/man3/*.3; do
-	cp -p $n $RPM_BUILD_ROOT%{_mandir}/man3
-done
+install -d $RPM_BUILD_ROOT%{_examplesdir}
+cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -109,14 +112,12 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CHANGES COPYING README
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_libdir}/libqwt.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libqwt.so.5
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/html/*.css doc/html/*.html doc/html/*.gif doc/html/*.png
-%doc examples
-%{_libdir}/libqwt.so
+%attr(755,root,root) %{_libdir}/libqwt.so
 %{_includedir}/qwt
 %{_mandir}/man3/Qwt*.3*
 %{_mandir}/man3/controlscreenshots.3*
@@ -127,7 +128,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/qwtlicense.3*
 %{_mandir}/man3/scatterscreenshots.3
 %{_mandir}/man3/spectrogramscreenshots.3*
+%{_examplesdir}/%{name}-%{version}
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/*.css doc/html/*.html doc/html/*.png examples
 
-%files -n qt4-plugin-qwt
+%files -n QtDesigner-plugin-qwt
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libqwt_designer_plugin.so
diff --git a/qwt-install.patch b/qwt-install.patch
new file mode 100644
index 0000000..54f92f8
--- /dev/null
+++ b/qwt-install.patch
@@ -0,0 +1,29 @@
+--- qwt-5.2.3/qwtconfig.pri.orig	2012-11-20 18:48:07.421235447 +0100
++++ qwt-5.2.3/qwtconfig.pri	2018-12-29 09:04:18.530475791 +0100
+@@ -8,16 +8,22 @@
+ VERSION      = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+ 
+ unix {
+-    INSTALLBASE    = /usr/local/qwt-$$VERSION
++    INSTALLBASE    ?= /usr/local/qwt-$$VERSION
++    LIBDIR         ?= $$INSTALLBASE/lib
++    INCDIR         ?= $$INSTALLBASE/include
++    DOCDIR         ?= $$INSTALLBASE/doc
+ }
+ 
+ win32 {
+     INSTALLBASE    = C:/Qwt-$$VERSION
++    LIBDIR         = $$INSTALLBASE/lib
++    INCDIR         = $$INSTALLBASE/include
++    DOCDIR         = $$INSTALLBASE/doc
+ }
+ 
+-target.path    = $$INSTALLBASE/lib
+-headers.path   = $$INSTALLBASE/include
+-doc.path       = $$INSTALLBASE/doc
++target.path    = $$LIBDIR
++headers.path   = $$INCDIR
++doc.path       = $$DOCDIR
+ 
+ ######################################################################
+ # qmake internal options
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qwt.git/commitdiff/8206b599d7948d95f4fdb7373bbbc68cd4cdfbf1



More information about the pld-cvs-commit mailing list