1 |
%ifarch %{arm} |
2 |
%define build_docs 0 |
3 |
%else |
4 |
%define build_docs 1 |
5 |
%endif |
6 |
|
7 |
%define qtmajor 5 |
8 |
%define qtminor 12 |
9 |
%define qtsubminor 2 |
10 |
|
11 |
%define rel 1 |
12 |
%define pre rc |
13 |
%define snapshot 0 |
14 |
|
15 |
%define qtversion %{qtmajor}.%{qtminor}.%{qtsubminor} |
16 |
|
17 |
%define libqtnetworkauth %mklibname qt5networkauth %qtmajor |
18 |
%define libqtnetworkauth_d %mklibname qt5networkauth -d |
19 |
|
20 |
%if %snapshot |
21 |
%define qttarballdir qtnetworkauth-everywhere-src-%{qtversion}-%pre |
22 |
%else |
23 |
%define qttarballdir qtnetworkauth-everywhere-src-%{qtversion} |
24 |
%endif |
25 |
|
26 |
Name: qtnetworkauth5 |
27 |
Version: %{qtversion} |
28 |
Release: %mkrel %{rel} |
29 |
Summary: Qt%{qtmajor} Network Authenticators |
30 |
Group: Development/KDE and Qt |
31 |
License: LGPLv2 with exceptions or GPLv3 with exceptions and GFDL |
32 |
URL: https://www.qt.io/ |
33 |
Source0: http://download.qt.io/official_releases/qt/%{qtmajor}.%{qtminor}/%{version}/submodules/%{qttarballdir}.tar.xz |
34 |
BuildRequires: qtbase5-devel >= %{version} |
35 |
|
36 |
#Branch Patchs |
37 |
|
38 |
#Trunk Patchs |
39 |
|
40 |
#Patch from Mageia |
41 |
|
42 |
%description |
43 |
Qt%{qtmajor} Network Authenticators; QtOAuth in particular. |
44 |
|
45 |
#------------------------------------------------------------------------------ |
46 |
|
47 |
%if %{build_docs} |
48 |
%package doc |
49 |
Summary: QtNetworkAuth%{qtmajor} APIs and tools docs |
50 |
Group: Documentation |
51 |
BuildArch: noarch |
52 |
BuildRequires: qttools5 |
53 |
# This one is required to build QCH-format documentation |
54 |
# for APIs and tools in this package set |
55 |
BuildRequires: qttools5-assistant |
56 |
Recommends: qttools5-assistant |
57 |
|
58 |
%description doc |
59 |
Documentation for APIs and tools in QtNetworkAuth%{qtmajor} package for |
60 |
use with Qt Assistant. |
61 |
|
62 |
%files doc |
63 |
%{_qt5_docdir}/qtnetworkauth.qch |
64 |
%{_qt5_docdir}/qtnetworkauth/ |
65 |
%endif |
66 |
|
67 |
#------------------------------------------------------------------------------ |
68 |
|
69 |
%package -n %{libqtnetworkauth} |
70 |
Summary: Qt%{qtmajor} NetworkAuth Component Library |
71 |
Group: System/Libraries |
72 |
|
73 |
%description -n %{libqtnetworkauth} |
74 |
Qt%{qtmajor} NetworkAuth Component Library. |
75 |
|
76 |
Qt Network Authenticators; QtOAuth in particular. |
77 |
|
78 |
%files -n %{libqtnetworkauth} |
79 |
%{_qt5_libdir}/libQt5NetworkAuth.so.%{qtmajor}{,.*} |
80 |
|
81 |
#------------------------------------------------------------------------------ |
82 |
|
83 |
%package -n %{libqtnetworkauth_d} |
84 |
Summary: Devel files needed to build apps based on QtNetworkAuth |
85 |
Group: Development/KDE and Qt |
86 |
Requires: %{libqtnetworkauth} = %{version} |
87 |
Provides: libqt5networkauth-devel = %{version} |
88 |
Provides: libqtnetworkauth5-devel = %{version} |
89 |
|
90 |
%description -n %{libqtnetworkauth_d} |
91 |
Devel files needed to build apps based on Qt NetworkAuth. |
92 |
|
93 |
%files -n %{libqtnetworkauth_d} |
94 |
%{_qt5_includedir}/QtNetworkAuth/ |
95 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_networkauth.pri |
96 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_networkauth_private.pri |
97 |
%{_qt5_libdir}/cmake/Qt5NetworkAuth/ |
98 |
%{_qt5_libdir}/libQt5NetworkAuth.prl |
99 |
%{_qt5_libdir}/libQt5NetworkAuth.so |
100 |
%{_qt5_libdir}/pkgconfig/Qt5NetworkAuth.pc |
101 |
%{_qt5_examplesdir}/oauth/ |
102 |
|
103 |
#------------------------------------------------------------------------------ |
104 |
|
105 |
%prep |
106 |
%setup -q -n qtnetworkauth-everywhere-src-%{qtversion} |
107 |
|
108 |
%build |
109 |
%qmake_qt5 |
110 |
%make_build |
111 |
|
112 |
%if %{build_docs} |
113 |
%__make docs |
114 |
%endif |
115 |
|
116 |
%install |
117 |
%make_install INSTALL_ROOT=%{buildroot} |
118 |
|
119 |
%if %{build_docs} |
120 |
%make_install install_docs INSTALL_ROOT=%{buildroot} |
121 |
%endif |
122 |
|
123 |
# .la and .a files, die, die, die. |
124 |
find %{buildroot} -name '*.la' -delete |