3 %bcond_without doc # Documentation
5 %define orgname qtgamepad
6 %define qtbase_ver %{version}
7 %define qtdeclarative_ver %{version}
8 %define qttools_ver %{version}
9 Summary: The Qt5 Gamepad library
10 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad
14 License: LGPL v3 or GPL v2+ or commercial
16 Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
17 # Source0-md5: 1073f14786812ab5a6203530c34f582a
18 URL: https://www.qt.io/
19 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
20 BuildRequires: Qt5DeviceDiscoverySupport-devel >= %{qtbase_ver}
21 BuildRequires: Qt5Gui-devel >= %{qtbase_ver}
22 BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
23 BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
24 BuildRequires: SDL2-devel
26 BuildRequires: qt5-assistant >= %{qttools_ver}
28 BuildRequires: qt5-build >= %{qtbase_ver}
29 BuildRequires: qt5-qmake >= %{qtbase_ver}
30 BuildRequires: rpm-build >= 4.6
31 BuildRequires: rpmbuild(macros) >= 2.016
32 BuildRequires: tar >= 1:1.22
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define specflags -fno-strict-aliasing
37 %define qt5dir %{_libdir}/qt5
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.
44 This package contains Qt5 Gamepad library.
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
52 Ten pakiet zawiera bibliotekę Qt5 Gamepad.
54 %package -n Qt5Gamepad
55 Summary: The Qt5 Gamepad library
56 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad
58 Requires: Qt5Core >= %{qtbase_ver}
59 Requires: Qt5Gui >= %{qtbase_ver}
60 Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
61 Requires: Qt5Quick-devel >= %{qtdeclarative_ver}
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
68 %description -n Qt5Gamepad -l pl.UTF-8
69 Biblioteka Qt5 Gamepad ułatwia użycie kontrolerów w apikacjach Qt.
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}
76 Requires: Qt5Gui-devel >= %{qtbase_ver}
77 Requires: Qt5Gamepad = %{version}-%{release}
79 %description -n Qt5Gamepad-devel
80 Qt5 Gamepad library - development files.
82 %description -n Qt5Gamepad-devel -l pl.UTF-8
83 Biblioteka Qt5 Gamepad - pliki programistyczne.
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
89 Requires: Qt5Gamepad = %{version}-%{release}
91 %description -n Qt5Gamepad-SDL2
92 The Qt5 Gamepad library plugin for SDL2.
94 %description -n Qt5Gamepad-SDL2 -l pl.UTF-8
95 Biblioteka Qt5 Gamepad - plugin do SDL2.
98 Summary: Qt5 Gamepad documentation in HTML format
99 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML
102 Requires: qt5-doc-common >= %{qtbase_ver}
106 Qt5 Gamepad documentation in HTML format.
108 %description doc -l pl.UTF-8
109 Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML.
112 Summary: Qt5 Gamepad documentation in QCH format
113 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH
116 Requires: qt5-doc-common >= %{qtbase_ver}
120 Qt5 Gamepad documentation in QCH format.
122 %description doc-qch -l pl.UTF-8
123 Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH.
126 Summary: Qt5 Gamepad examples
127 Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Gamepad
128 License: BSD or commercial
129 Group: Development/Libraries
132 %description examples
133 Qt5 Gamepad examples.
135 %description examples -l pl.UTF-8
136 Przykłady do biblioteki Qt5 Gamepad.
139 %setup -q -n %{orgname}-everywhere-src-%{version}
144 %{?with_doc:%{__make} docs}
147 rm -rf $RPM_BUILD_ROOT
150 INSTALL_ROOT=$RPM_BUILD_ROOT
153 %{__make} install_docs \
154 INSTALL_ROOT=$RPM_BUILD_ROOT
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
162 # Prepare some files list
164 r="$RPM_BUILD_ROOT$2"
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
172 echo "Error generation $1 files list!"
173 echo "$r: no such file or directory!"
179 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
184 echo "%defattr(644,root,root,755)" > examples.files
185 ifecho_tree examples %{_examplesdir}/qt5/gamepad
188 rm -rf $RPM_BUILD_ROOT
190 %post -n Qt5Gamepad -p /sbin/ldconfig
191 %postun -n Qt5Gamepad -p /sbin/ldconfig
194 %defattr(644,root,root,755)
195 %doc README.md dist/changes-*
197 %attr(755,root,root) %{_libdir}/libQt5Gamepad.so.*.*.*
198 %attr(755,root,root) %ghost %{_libdir}/libQt5Gamepad.so.5
199 %dir %{qt5dir}/qml/QtGamepad
200 # R: Qt5Core Qt5Gamepad Qt5Gui Qt5Qml Qt5Quick
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
205 # R: Qt5Core Qt5Gamepad udev-libs
206 %attr(755,root,root) %{qt5dir}/plugins/gamepads/libevdevgamepad.so
207 %dir %{_libdir}/cmake/Qt5Gamepad
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
215 %{_libdir}/cmake/Qt5Gamepad/Qt5GamepadConfig*.cmake
216 %{_libdir}/cmake/Qt5Gamepad/Qt5Gamepad_QEvdevGamepadBackendPlugin.cmake
217 %{qt5dir}/mkspecs/modules/qt_lib_gamepad.pri
218 %{qt5dir}/mkspecs/modules/qt_lib_gamepad_private.pri
220 %files -n Qt5Gamepad-SDL2
221 %defattr(644,root,root,755)
222 # R: Qt5Core Qt5Gamepad SDL2
223 %attr(755,root,root) %{qt5dir}/plugins/gamepads/libsdl2gamepad.so
224 %{_libdir}/cmake/Qt5Gamepad/Qt5Gamepad_QSdl2GamepadBackendPlugin.cmake
228 %defattr(644,root,root,755)
229 %{_docdir}/qt5-doc/qtgamepad
232 %defattr(644,root,root,755)
233 %{_docdir}/qt5-doc/qtgamepad.qch
236 %files examples -f examples.files
237 %defattr(644,root,root,755)
238 # XXX: dir shared with qt5-qtbase-examples
239 %dir %{_examplesdir}/qt5