]> git.pld-linux.org Git - packages/qt5-qtconnectivity.git/blobdiff - qt5-qtconnectivity.spec
up to 5.14.0
[packages/qt5-qtconnectivity.git] / qt5-qtconnectivity.spec
index d1d0c645cfef48a679ca06fa042d8234dc533608..04d09d99567e9d649987465f0a756b59b5df01af 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Conditional build:
-%bcond_without qch     # documentation in QCH format
+%bcond_without doc     # Documentation
+%bcond_without qm      # QM translations
 
 %define                orgname         qtconnectivity
 %define                qtbase_ver              %{version}
 Summary:       The Qt5 Connectivity libraries
 Summary(pl.UTF-8):     Biblioteki Qt5 Connectivity
 Name:          qt5-%{orgname}
-Version:       5.3.0
+Version:       5.14.0
 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: 46e4e8df94b4da4415aa5f5076b8bc45
-URL:           http://qt-project.org/
+Source0:       http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
+# Source0-md5: 1be53fb77b52e2b8f22ef8b7e151b384
+Source1:       http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
+# Source1-md5: 74ff09655d412069a7b4210fea5440fb
+URL:           http://www.qt.io/
 BuildRequires: Qt5Concurrent-devel >= %{qtbase_ver}
 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
 BuildRequires: Qt5DBus-devel >= %{qtbase_ver}
 BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
 BuildRequires: bluez-libs-devel
-%if %{with qch}
+%if %{with doc}
 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
@@ -50,10 +54,23 @@ systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
 
 Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc.
 
+%package common
+Summary:       Common files used by all Qt5 Connectivity components
+Summary(pl.UTF-8):     Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 Connectivity
+Group:         Libraries
+
+%description common
+Common files used by all Qt5 Connectivity components.
+
+%description common -l pl.UTF-8
+Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5
+Connectivity.
+
 %package -n Qt5Bluetooth
 Summary:       Qt5 Bluetooth library
 Summary(pl.UTF-8):     Biblioteka Qt5 Bluetooth
 Group:         Libraries
+Requires:      %{name}-common = %{version}-%{release}
 Requires:      Qt5Core >= %{qtbase_ver}
 Requires:      Qt5DBus >= %{qtbase_ver}
 Requires:      Qt5Qml >= %{qtdeclarative_ver}
@@ -87,6 +104,7 @@ Biblioteka Qt5 Bluetooth - pliki programistyczne.
 Summary:       Qt5 Nfc library
 Summary(pl.UTF-8):     Biblioteka Qt5 Nfc
 Group:         Libraries
+Requires:      %{name}-common = %{version}-%{release}
 Requires:      Qt5Core >= %{qtbase_ver}
 Requires:      Qt5DBus >= %{qtbase_ver}
 Requires:      Qt5Qml >= %{qtdeclarative_ver}
@@ -160,23 +178,39 @@ Qt5 Connectivity examples.
 Przykłady do bibliotek Qt5 Connectivity.
 
 %prep
-%setup -q -n %{orgname}-opensource-src-%{version}
+%setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
 
 %build
 qmake-qt5
 %{__make}
-%{__make} %{!?with_qch:html_}docs
+%{?with_doc:%{__make} docs}
+
+%if %{with qm}
+cd qttranslations-everywhere-src-%{version}
+qmake-qt5
+%{__make}
+cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
-%{__make} install_%{!?with_qch:html_}docs \
+%if %{with doc}
+%{__make} install_docs \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+
+%if %{with qm}
+%{__make} -C qttranslations-everywhere-src-%{version} install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
+# keep only qtconnectivity
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets,qtxmlpatterns}_*.qm
+%endif
 
 # useless symlinks
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
 # actually drop *.la, follow policy of not packaging them when *.pc exist
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
 
@@ -206,6 +240,20 @@ echo "%defattr(644,root,root,755)" > examples.files
 ifecho_tree examples %{_examplesdir}/qt5/bluetooth
 ifecho_tree examples %{_examplesdir}/qt5/nfc
 
+# 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)' > qtconnectivity.lang
+%if %{with qm}
+find_qt5_qm qtconnectivity >> qtconnectivity.lang
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -215,11 +263,15 @@ rm -rf $RPM_BUILD_ROOT
 %post  -n Qt5Nfc -p /sbin/ldconfig
 %postun        -n Qt5Nfc -p /sbin/ldconfig
 
+%files common -f qtconnectivity.lang
+%defattr(644,root,root,755)
+%doc LICENSE.GPL3-EXCEPT dist/changes-*
+
 %files -n Qt5Bluetooth
 %defattr(644,root,root,755)
-%doc LGPL_EXCEPTION.txt dist/changes-*
 %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libQt5Bluetooth.so.5
+%attr(755,root,root) %{qt5dir}/bin/sdpscanner
 %dir %{qt5dir}/qml/QtBluetooth
 %attr(755,root,root) %{qt5dir}/qml/QtBluetooth/libdeclarative_bluetooth.so
 %{qt5dir}/qml/QtBluetooth/plugins.qmltypes
@@ -237,7 +289,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n Qt5Nfc
 %defattr(644,root,root,755)
-%doc LGPL_EXCEPTION.txt dist/changes-*
 %attr(755,root,root) %{_libdir}/libQt5Nfc.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libQt5Nfc.so.5
 %dir %{qt5dir}/qml/QtNfc
@@ -255,12 +306,12 @@ rm -rf $RPM_BUILD_ROOT
 %{qt5dir}/mkspecs/modules/qt_lib_nfc.pri
 %{qt5dir}/mkspecs/modules/qt_lib_nfc_private.pri
 
+%if %{with doc}
 %files doc
 %defattr(644,root,root,755)
 %{_docdir}/qt5-doc/qtbluetooth
 %{_docdir}/qt5-doc/qtnfc
 
-%if %{with qch}
 %files doc-qch
 %defattr(644,root,root,755)
 %{_docdir}/qt5-doc/qtbluetooth.qch
This page took 0.032678 seconds and 4 git commands to generate.