[qwt] .spec cosmetics use %_qt4_ macros doc subpkg here (instead of separately built)
Rex Dieter
rdieter at fedoraproject.org
Thu Jul 14 13:43:08 UTC 2011
commit 2174252bbb666d39616d3df91b3f3059023129a9
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Jul 14 08:42:46 2011 -0500
.spec cosmetics
use %_qt4_ macros
doc subpkg here (instead of separately built)
qwt-5.2.1-install_qt.patch | 49 +++++++++++++++++++++++++++++++++
qwt-path.patch | 45 ------------------------------
qwt.spec | 65 +++++++++++++++++++++++++++++++-------------
3 files changed, 95 insertions(+), 64 deletions(-)
---
diff --git a/qwt-5.2.1-install_qt.patch b/qwt-5.2.1-install_qt.patch
new file mode 100644
index 0000000..994d3b7
--- /dev/null
+++ b/qwt-5.2.1-install_qt.patch
@@ -0,0 +1,49 @@
+diff -up qwt-5.2.1/qwtconfig.pri.install_qt qwt-5.2.1/qwtconfig.pri
+--- qwt-5.2.1/qwtconfig.pri.install_qt 2010-04-11 04:55:06.000000000 -0500
++++ qwt-5.2.1/qwtconfig.pri 2011-07-14 08:22:26.207212795 -0500
+@@ -7,6 +7,11 @@ VER_MIN = 2
+ VER_PAT = 1
+ VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+
++CONFIG(install-qt) {
++target.path = $$[QT_INSTALL_LIBS]
++headers.path = $$[QT_INSTALL_HEADERS]/qwt
++doc.path = $$[QT_INSTALL_DOCS]
++} else {
+ unix {
+ INSTALLBASE = /usr/local/qwt-5.2.1
+ }
+@@ -18,6 +23,7 @@ win32 {
+ target.path = $$INSTALLBASE/lib
+ headers.path = $$INSTALLBASE/include
+ doc.path = $$INSTALLBASE/doc
++}
+
+ ######################################################################
+ # qmake internal options
+diff -up qwt-5.2.1/src/src.pro.install_qt qwt-5.2.1/src/src.pro
+--- qwt-5.2.1/src/src.pro.install_qt 2010-04-11 04:55:06.000000000 -0500
++++ qwt-5.2.1/src/src.pro 2011-07-14 08:30:39.759190828 -0500
+@@ -220,9 +220,17 @@ contains(CONFIG, QwtWidgets) {
+ # Install directives
+
+ headers.files = $$HEADERS
+-doc.files = $${QWT_ROOT}/doc/html $${QWT_ROOT}/doc/qwt-5.2.0.qch
+-unix {
+- doc.files += $${QWT_ROOT}/doc/man
+-}
++INSTALLS += target headers
++
++html.files = $${QWT_ROOT}/doc/html
++html.path = $$[QT_INSTALL_DOCS]/html/
++INSTALLS += html
++
++qch.files = $${QWT_ROOT}/doc/qwt-5.2.0.qch
++qch.path = $$[QT_INSTALL_DOCS]/qch
++INSTALLS += qch
++
++unix:man.files += $${QWT_ROOT}/doc/man
++unix:man.path = /usr/share
++unix:INSTALLS += man
+
+-INSTALLS = target headers doc
diff --git a/qwt.spec b/qwt.spec
index 90cf29a..bcb530d 100644
--- a/qwt.spec
+++ b/qwt.spec
@@ -2,7 +2,7 @@
Name: qwt
Summary: Qt Widgets for Technical Applications
Version: 5.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2 with exceptions
URL: http://qwt.sourceforge.net
@@ -10,10 +10,15 @@ Group: System Environment/Libraries
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Patch0: qwt-path.patch
+## upstreamable patches
+# add install-qt config to use system paths
+# needs work to fix the doc install for non install-qt case
+Patch50: qwt-5.2.1-install_qt.patch
BuildRequires: qt4-devel
+%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
+
%description
The Qwt library contains GUI Components and utility classes which are primarily
useful for programs with a technical background.
@@ -23,34 +28,43 @@ or ranges of type double.
%package devel
Summary: Development files for %{name}
+Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: qt4-devel
-Group: Development/Libraries
%description devel
%{summary}.
+%package doc
+Summary: Extra Developer documentation for %{name}
+Group: Documentation
+Requires: %{name}-devel = %{version}-%{release}
+BuildArch: noarch
+%description doc
+%{summary}.
+
+
%prep
-%setup -qn %{name}-%{version}
-%patch0 -p1
-sed -i "s\LIBPATH\ $RPM_BUILD_ROOT%{_libdir}\1" qwtconfig.pri
-sed -i "s\HEADERPATH\ $RPM_BUILD_ROOT%{_includedir}/%{name}\1" qwtconfig.pri
-sed -i "s\DOCKPATH\ $RPM_BUILD_ROOT%{_docdir}/%{name}\1" qwtconfig.pri
-#sed -i "s\QTDESIGNERPATH\ $RPM_BUILD_ROOT%{_qt4_plugindir}/designer\1" designer/designer.pro
-sed -i "s\QTDESIGNERPATH\ $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/designer\1" designer/designer.pro
+%setup -q
+
+%patch50 -p1 -b .install_qt
%build
-%{?_qt4_qmake}%{!?_qt4_qmake:%{_libdir}/qt4/bin/qmake}
+%{?_qt4_qmake} \
+ CONFIG+=QwtSVGItem \
+ CONFIG+=install-qt
-make
+make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
-make install
-#remove unneeded stuff
-rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+make install INSTALL_ROOT=$RPM_BUILD_ROOT
+
+# fixup docs bogosity
+mv $RPM_BUILD_ROOT%{_qt4_docdir}/html/html \
+ $RPM_BUILD_ROOT%{_qt4_docdir}/html/qwt
%post -p /sbin/ldconfig
@@ -66,16 +80,29 @@ rm -rf $RPM_BUILD_ROOT
%doc CHANGES
%doc COPYING
%doc README
-%{_libdir}/libqwt.so.5*
+%{_qt4_libdir}/libqwt.so.5*
%files devel
%defattr(-,root,root,-)
-%{_includedir}/qwt/
-%{_libdir}/libqwt.so
-%{?_qt4_plugindir}%{!?_qt4_plugindir:%{_libdir}/qt4/plugins}/designer/libqwt_designer_plugin.so
+%{_mandir}/man3/*
+%{_qt4_headerdir}/qwt/
+%{_qt4_libdir}/libqwt.so
+%{?_qt4_plugindir}/designer/libqwt_designer_plugin.so
+
+%files doc
+%defattr(-,root,root,-)
+# own these to avoid needless dep on qt/qt-doc
+%dir %{_qt4_docdir}
+%dir %{_qt4_docdir}/html/
+%{_qt4_docdir}/html/qwt/
%changelog
+* Thu Jul 14 2011 Rex Dieter <rdieter at fedoraproject.org> 5.2.1-3
+- .spec cosmetics
+- use %%_qt4_ macros
+- -doc subpkg here (instead of separately built)
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list