[packages/qt5-qtlocation] - updated to 5.3.1 - added translations

qboosh qboosh at pld-linux.org
Sat Jul 5 07:51:41 CEST 2014


commit 52e14148f2d09adc4c6f8f269063d3b8bf91174b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 5 07:56:15 2014 +0200

    - updated to 5.3.1
    - added translations

 qt5-qtlocation.spec | 40 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 4 deletions(-)
---
diff --git a/qt5-qtlocation.spec b/qt5-qtlocation.spec
index 2b2e1cd..50b4d04 100644
--- a/qt5-qtlocation.spec
+++ b/qt5-qtlocation.spec
@@ -4,6 +4,7 @@
 #
 # Conditional build:
 %bcond_without	qch	# documentation in QCH format
+%bcond_without	qm	# QM translations
 
 %define		qtbase_ver		%{version}
 %define		qtdeclarative_ver	%{version}
@@ -12,12 +13,14 @@
 Summary:	The Qt5 Location library
 Summary(pl.UTF-8):	Biblioteka Qt5 Location
 Name:		qt5-%{orgname}
-Version:	5.3.0
+Version:	5.3.1
 Release:	1
 License:	LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
 Group:		Libraries
 Source0:	http://download.qt-project.org/official_releases/qt/5.3/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz
-# Source0-md5:	bfc7678bfe7d78f12fb20a54ac54e610
+# Source0-md5:	697731ec5aaf482826495cd419cab4f0
+Source1:	http://download.qt-project.org/official_releases/qt/5.3/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz
+# Source1-md5:	d43878fc7a5b9fdee03039770dbac1fa
 URL:		http://qt-project.org/
 BuildRequires:	GConf2-devel >= 2.0
 BuildRequires:	Qt5Core-devel >= %{qtbase_ver}
@@ -31,6 +34,7 @@ BuildRequires:	pkgconfig
 BuildRequires:	qt5-assistant >= %{qttools_ver}
 %endif
 BuildRequires:	qt5-build >= %{qtbase_ver}
+%{?with_qm:BuildRequires:	qt5-linguist >= %{qttools_ver}}
 BuildRequires:	qt5-qmake >= %{qtbase_ver}
 BuildRequires:	rpmbuild(macros) >= 1.654
 BuildRequires:	tar >= 1:1.22
@@ -134,13 +138,20 @@ Qt5 Location (Qt5Positioning) examples.
 Przykłady do biblioteki Qt5 Location (Qt5Positioning).
 
 %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 \
@@ -149,6 +160,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 qtlocation
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtmultimedia,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
@@ -180,13 +198,27 @@ echo "%defattr(644,root,root,755)" > examples.files
 ifecho_tree examples %{_examplesdir}/qt5/qtpositioning
 ifecho_tree examples %{_examplesdir}/qt5/positioning
 
+# 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)' > qtlocation.lang
+%if %{with qm}
+find_qt5_qm qtlocation >> qtlocation.lang
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post	-n Qt5Positioning -p /sbin/ldconfig
 %postun	-n Qt5Positioning -p /sbin/ldconfig
 
-%files -n Qt5Positioning
+%files -n Qt5Positioning -f qtlocation.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libQt5Positioning.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libQt5Positioning.so.5
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtlocation.git/commitdiff/52e14148f2d09adc4c6f8f269063d3b8bf91174b



More information about the pld-cvs-commit mailing list