[packages/qt5-qtwebsockets] - updated to 5.5.1 - added translations
qboosh
qboosh at pld-linux.org
Fri Nov 13 20:39:54 CET 2015
commit 2cb2e89bcee71348532fc5bd9ad621d12f01218a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Nov 13 20:40:10 2015 +0100
- updated to 5.5.1
- added translations
qt5-qtwebsockets.spec | 50 ++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 42 insertions(+), 8 deletions(-)
---
diff --git a/qt5-qtwebsockets.spec b/qt5-qtwebsockets.spec
index 6c88f34..b371bb5 100644
--- a/qt5-qtwebsockets.spec
+++ b/qt5-qtwebsockets.spec
@@ -1,6 +1,7 @@
#
# Conditional build:
%bcond_without qch # documentation in QCH format
+%bcond_without qm # QM translations
%define orgname qtwebsockets
%define qtbase_ver %{version}
@@ -9,13 +10,15 @@
Summary: The Qt5 WebSockets library
Summary(pl.UTF-8): Biblioteka Qt5 WebSockets
Name: qt5-%{orgname}
-Version: 5.4.2
+Version: 5.5.1
Release: 1
License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
Group: X11/Libraries
-Source0: http://download.qt-project.org/official_releases/qt/5.4/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz
-# Source0-md5: 0c012cda021d66d66fca1e9f00dc68d8
-URL: http://qt-project.org/
+Source0: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz
+# Source0-md5: cd4083945b76b075bc67dcc38e411d04
+Source1: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz
+# Source1-md5: 1f89d53fe759db123b4b6d9de9d9e8c9
+URL: http://www.qt.io/
BuildRequires: Qt5Core-devel >= %{qtbase_ver}
BuildRequires: Qt5Network-devel >= %{qtbase_ver}
BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
@@ -25,6 +28,7 @@ BuildRequires: Qt5Sql-devel >= %{qtbase_ver}
BuildRequires: qt5-assistant >= %{qttools_ver}
%endif
BuildRequires: qt5-build >= %{qtbase_ver}
+%{?with_qm:BuildRequires: qt5-linguist >= 5.2}
BuildRequires: qt5-qmake >= %{qtbase_ver}
BuildRequires: rpmbuild(macros) >= 1.654
BuildRequires: tar >= 1:1.22
@@ -125,13 +129,20 @@ Qt5 WebSockets examples.
Przykłady do biblioteki Qt5 WebSockets.
%prep
-%setup -q -n %{orgname}-opensource-src-%{version}
+%setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1}
%build
qmake-qt5
%{__make}
%{__make} %{!?with_qch:html_}docs
+%if %{with qm}
+cd qttranslations-opensource-src-%{version}
+qmake-qt5
+%{__make}
+cd ..
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
@@ -140,6 +151,13 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install_%{!?with_qch:html_}docs \
INSTALL_ROOT=$RPM_BUILD_ROOT
+%if %{with qm}
+%{__make} -C qttranslations-opensource-src-%{version} install \
+ INSTALL_ROOT=$RPM_BUILD_ROOT
+# keep only qtwebsockets
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquick1,qtscript,qtxmlpatterns}_*.qm
+%endif
+
# useless symlinks
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?
# actually drop *.la, follow policy of not packaging them when *.pc exist
@@ -170,21 +188,37 @@ ifecho_tree() {
echo "%defattr(644,root,root,755)" > examples.files
ifecho_tree examples %{_examplesdir}/qt5/websockets
+# find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
+find_qt5_qm()
+{
+ name="$1"
+ find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \
+ sed -e "s:^$RPM_BUILD_ROOT::" \
+ -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:'
+}
+
+echo '%defattr(644,root,root,755)' > qtwebsockets.lang
+%if %{with qm}
+find_qt5_qm qtwebsockets >> qtwebsockets.lang
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
%post -n Qt5WebSockets -p /sbin/ldconfig
%postun -n Qt5WebSockets -p /sbin/ldconfig
-%files -n Qt5WebSockets
+%files -n Qt5WebSockets -f qtwebsockets.lang
%defattr(644,root,root,755)
%doc README.md
%attr(755,root,root) %{_libdir}/libQt5WebSockets.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libQt5WebSockets.so.5
%dir %{qt5dir}/qml/Qt/WebSockets
-%attr(755,root,root) %{qt5dir}/qml/Qt/WebSockets/libdeclarative_qmlwebsockets.so
-%{qt5dir}/qml/Qt/WebSockets/plugins.qmltypes
%{qt5dir}/qml/Qt/WebSockets/qmldir
+%dir %{qt5dir}/qml/QtWebSockets
+%attr(755,root,root) %{qt5dir}/qml/QtWebSockets/libdeclarative_qmlwebsockets.so
+%{qt5dir}/qml/QtWebSockets/plugins.qmltypes
+%{qt5dir}/qml/QtWebSockets/qmldir
%files -n Qt5WebSockets-devel
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtwebsockets.git/commitdiff/2cb2e89bcee71348532fc5bd9ad621d12f01218a
More information about the pld-cvs-commit
mailing list