]>
Commit | Line | Data |
---|---|---|
4ebefc1c BS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Documentation | |
4 | ||
5 | %define orgname qtgamepad | |
0dd6ac5f JB |
6 | %define qtbase_ver %{version} |
7 | %define qtdeclarative_ver %{version} | |
8 | %define qttools_ver %{version} | |
4ebefc1c BS |
9 | Summary: The Qt5 Gamepad library |
10 | Summary(pl.UTF-8): Biblioteka Qt5 Gamepad | |
11 | Name: qt5-%{orgname} | |
797d8139 | 12 | Version: 5.15.7 |
cdc9d7bd | 13 | Release: 1 |
0dd6ac5f | 14 | License: LGPL v3 or GPL v2+ or commercial |
4ebefc1c | 15 | Group: Libraries |
2e3432ae | 16 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz |
797d8139 | 17 | # Source0-md5: 0575e1e5285f541124c4f0de63048bae |
0dd6ac5f | 18 | URL: https://www.qt.io/ |
4ebefc1c BS |
19 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
20 | BuildRequires: Qt5DeviceDiscoverySupport-devel >= %{qtbase_ver} | |
21 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
0dd6ac5f JB |
22 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} |
23 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
4ebefc1c BS |
24 | BuildRequires: SDL2-devel |
25 | %if %{with doc} | |
26 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
27 | %endif | |
28 | BuildRequires: qt5-build >= %{qtbase_ver} | |
29 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
c091c8bf | 30 | BuildRequires: rpm-build >= 4.6 |
af993631 | 31 | BuildRequires: rpmbuild(macros) >= 2.016 |
4ebefc1c BS |
32 | BuildRequires: tar >= 1:1.22 |
33 | BuildRequires: xz | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %define specflags -fno-strict-aliasing | |
37 | %define qt5dir %{_libdir}/qt5 | |
38 | ||
39 | %description | |
40 | Qt is a cross-platform application and UI framework. Using Qt, you can | |
41 | write web-enabled applications once and deploy them across desktop, | |
42 | mobile and embedded systems without rewriting the source code. | |
43 | ||
44 | This package contains Qt5 Gamepad library. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
48 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
49 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
50 | źródłowego. | |
51 | ||
52 | Ten pakiet zawiera bibliotekę Qt5 Gamepad. | |
53 | ||
54 | %package -n Qt5Gamepad | |
55 | Summary: The Qt5 Gamepad library | |
56 | Summary(pl.UTF-8): Biblioteka Qt5 Gamepad | |
57 | Group: Libraries | |
58 | Requires: Qt5Core >= %{qtbase_ver} | |
0dd6ac5f JB |
59 | Requires: Qt5Gui >= %{qtbase_ver} |
60 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
61 | Requires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
4ebefc1c BS |
62 | |
63 | %description -n Qt5Gamepad | |
64 | Qt Gamepad is an add-on library that enables Qt applications to | |
65 | support the use of gamepad hardware and in some cases remote control | |
66 | equipment. | |
67 | ||
68 | %description -n Qt5Gamepad -l pl.UTF-8 | |
69 | Biblioteka Qt5 Gamepad ułatwia użycie kontrolerów w apikacjach Qt. | |
70 | ||
71 | %package -n Qt5Gamepad-devel | |
72 | Summary: Qt5 Gamepad library - development files | |
73 | Summary(pl.UTF-8): Biblioteka Qt5 Gamepad - pliki programistyczne | |
74 | Group: Development/Libraries | |
75 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
0dd6ac5f | 76 | Requires: Qt5Gui-devel >= %{qtbase_ver} |
4ebefc1c BS |
77 | Requires: Qt5Gamepad = %{version}-%{release} |
78 | ||
79 | %description -n Qt5Gamepad-devel | |
80 | Qt5 Gamepad library - development files. | |
81 | ||
82 | %description -n Qt5Gamepad-devel -l pl.UTF-8 | |
83 | Biblioteka Qt5 Gamepad - pliki programistyczne. | |
84 | ||
85 | %package -n Qt5Gamepad-SDL2 | |
86 | Summary: The Qt5 Gamepad library plugin for SDL2 | |
87 | Summary(pl.UTF-8): Biblioteka Qt5 Gamepad - plugin do SDL2 | |
88 | Group: Libraries | |
89 | Requires: Qt5Gamepad = %{version}-%{release} | |
90 | ||
91 | %description -n Qt5Gamepad-SDL2 | |
92 | The Qt5 Gamepad library plugin for SDL2. | |
93 | ||
94 | %description -n Qt5Gamepad-SDL2 -l pl.UTF-8 | |
95 | Biblioteka Qt5 Gamepad - plugin do SDL2. | |
96 | ||
97 | %package doc | |
98 | Summary: Qt5 Gamepad documentation in HTML format | |
99 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML | |
0dd6ac5f | 100 | License: FDL v1.3 |
4ebefc1c BS |
101 | Group: Documentation |
102 | Requires: qt5-doc-common >= %{qtbase_ver} | |
607d6674 | 103 | BuildArch: noarch |
4ebefc1c BS |
104 | |
105 | %description doc | |
106 | Qt5 Gamepad documentation in HTML format. | |
107 | ||
108 | %description doc -l pl.UTF-8 | |
109 | Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML. | |
110 | ||
111 | %package doc-qch | |
112 | Summary: Qt5 Gamepad documentation in QCH format | |
113 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH | |
0dd6ac5f | 114 | License: FDL v1.3 |
4ebefc1c BS |
115 | Group: Documentation |
116 | Requires: qt5-doc-common >= %{qtbase_ver} | |
607d6674 | 117 | BuildArch: noarch |
4ebefc1c BS |
118 | |
119 | %description doc-qch | |
120 | Qt5 Gamepad documentation in QCH format. | |
121 | ||
122 | %description doc-qch -l pl.UTF-8 | |
123 | Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH. | |
124 | ||
125 | %package examples | |
126 | Summary: Qt5 Gamepad examples | |
127 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Gamepad | |
0dd6ac5f | 128 | License: BSD or commercial |
4ebefc1c | 129 | Group: Development/Libraries |
607d6674 | 130 | BuildArch: noarch |
4ebefc1c BS |
131 | |
132 | %description examples | |
133 | Qt5 Gamepad examples. | |
134 | ||
135 | %description examples -l pl.UTF-8 | |
136 | Przykłady do biblioteki Qt5 Gamepad. | |
137 | ||
138 | %prep | |
139 | %setup -q -n %{orgname}-everywhere-src-%{version} | |
140 | ||
141 | %build | |
af993631 | 142 | %{qmake_qt5} |
4ebefc1c BS |
143 | %{__make} |
144 | %{?with_doc:%{__make} docs} | |
145 | ||
146 | %install | |
147 | rm -rf $RPM_BUILD_ROOT | |
0dd6ac5f | 148 | |
4ebefc1c BS |
149 | %{__make} install \ |
150 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
151 | ||
152 | %if %{with doc} | |
153 | %{__make} install_docs \ | |
154 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
155 | %endif | |
156 | ||
157 | # useless symlinks | |
158 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? | |
159 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
160 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
161 | ||
162 | # Prepare some files list | |
163 | ifecho() { | |
164 | r="$RPM_BUILD_ROOT$2" | |
165 | if [ -d "$r" ]; then | |
166 | echo "%%dir $2" >> $1.files | |
167 | elif [ -x "$r" ] ; then | |
168 | echo "%%attr(755,root,root) $2" >> $1.files | |
169 | elif [ -f "$r" ]; then | |
170 | echo "$2" >> $1.files | |
171 | else | |
172 | echo "Error generation $1 files list!" | |
173 | echo "$r: no such file or directory!" | |
174 | return 1 | |
175 | fi | |
176 | } | |
177 | ifecho_tree() { | |
178 | ifecho $1 $2 | |
179 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
180 | ifecho $1 $2/$f | |
181 | done | |
182 | } | |
183 | ||
184 | echo "%defattr(644,root,root,755)" > examples.files | |
185 | ifecho_tree examples %{_examplesdir}/qt5/gamepad | |
186 | ||
187 | %clean | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
190 | %post -n Qt5Gamepad -p /sbin/ldconfig | |
191 | %postun -n Qt5Gamepad -p /sbin/ldconfig | |
192 | ||
193 | %files -n Qt5Gamepad | |
194 | %defattr(644,root,root,755) | |
0dd6ac5f JB |
195 | %doc README.md dist/changes-* |
196 | # R: Qt5Core Qt5Gui | |
4ebefc1c BS |
197 | %attr(755,root,root) %{_libdir}/libQt5Gamepad.so.*.*.* |
198 | %attr(755,root,root) %ghost %{_libdir}/libQt5Gamepad.so.5 | |
199 | %dir %{qt5dir}/qml/QtGamepad | |
0dd6ac5f | 200 | # R: Qt5Core Qt5Gamepad Qt5Gui Qt5Qml Qt5Quick |
4ebefc1c BS |
201 | %attr(755,root,root) %{qt5dir}/qml/QtGamepad/libdeclarative_gamepad.so |
202 | %{qt5dir}/qml/QtGamepad/plugins.qmltypes | |
203 | %{qt5dir}/qml/QtGamepad/qmldir | |
204 | %dir %{qt5dir}/plugins/gamepads | |
0dd6ac5f | 205 | # R: Qt5Core Qt5Gamepad udev-libs |
4ebefc1c | 206 | %attr(755,root,root) %{qt5dir}/plugins/gamepads/libevdevgamepad.so |
8ffdc846 | 207 | %dir %{_libdir}/cmake/Qt5Gamepad |
4ebefc1c BS |
208 | |
209 | %files -n Qt5Gamepad-devel | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/libQt5Gamepad.so | |
212 | %{_libdir}/libQt5Gamepad.prl | |
213 | %{_includedir}/qt5/QtGamepad | |
214 | %{_pkgconfigdir}/Qt5Gamepad.pc | |
8ffdc846 JB |
215 | %{_libdir}/cmake/Qt5Gamepad/Qt5GamepadConfig*.cmake |
216 | %{_libdir}/cmake/Qt5Gamepad/Qt5Gamepad_QEvdevGamepadBackendPlugin.cmake | |
4ebefc1c BS |
217 | %{qt5dir}/mkspecs/modules/qt_lib_gamepad.pri |
218 | %{qt5dir}/mkspecs/modules/qt_lib_gamepad_private.pri | |
219 | ||
220 | %files -n Qt5Gamepad-SDL2 | |
221 | %defattr(644,root,root,755) | |
0dd6ac5f | 222 | # R: Qt5Core Qt5Gamepad SDL2 |
4ebefc1c | 223 | %attr(755,root,root) %{qt5dir}/plugins/gamepads/libsdl2gamepad.so |
8ffdc846 | 224 | %{_libdir}/cmake/Qt5Gamepad/Qt5Gamepad_QSdl2GamepadBackendPlugin.cmake |
4ebefc1c BS |
225 | |
226 | %if %{with doc} | |
227 | %files doc | |
228 | %defattr(644,root,root,755) | |
229 | %{_docdir}/qt5-doc/qtgamepad | |
230 | ||
231 | %files doc-qch | |
232 | %defattr(644,root,root,755) | |
233 | %{_docdir}/qt5-doc/qtgamepad.qch | |
234 | %endif | |
235 | ||
236 | %files examples -f examples.files | |
237 | %defattr(644,root,root,755) | |
238 | # XXX: dir shared with qt5-qtbase-examples | |
239 | %dir %{_examplesdir}/qt5 |