3 %bcond_without doc # Documentation
5 %define orgname qtgamepad
6 %define qtbase_ver %{version}
7 %define qttools_ver %{version}
8 Summary: The Qt5 Gamepad library
9 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad
13 License: GPL v3.0 or LGPLv3
15 Source0: http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
16 # Source0-md5: d696f6552e6eaf9a89385624adbb8d87
17 URL: http://www.qt.io/
18 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
19 BuildRequires: Qt5DeviceDiscoverySupport-devel >= %{qtbase_ver}
20 BuildRequires: Qt5Gui-devel >= %{qtbase_ver}
21 BuildRequires: Qt5Widgets-devel >= %{qtbase_ver}
22 BuildRequires: SDL2-devel
24 BuildRequires: qt5-assistant >= %{qttools_ver}
26 BuildRequires: qt5-build >= %{qtbase_ver}
27 BuildRequires: qt5-qmake >= %{qtbase_ver}
28 BuildRequires: rpmbuild(macros) >= 1.654
29 BuildRequires: tar >= 1:1.22
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define specflags -fno-strict-aliasing
34 %define qt5dir %{_libdir}/qt5
37 Qt is a cross-platform application and UI framework. Using Qt, you can
38 write web-enabled applications once and deploy them across desktop,
39 mobile and embedded systems without rewriting the source code.
41 This package contains Qt5 Gamepad library.
43 %description -l pl.UTF-8
44 Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
45 Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
46 systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
49 Ten pakiet zawiera bibliotekę Qt5 Gamepad.
51 %package -n Qt5Gamepad
52 Summary: The Qt5 Gamepad library
53 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad
55 Requires: Qt5Core >= %{qtbase_ver}
57 %description -n Qt5Gamepad
58 Qt Gamepad is an add-on library that enables Qt applications to
59 support the use of gamepad hardware and in some cases remote control
62 %description -n Qt5Gamepad -l pl.UTF-8
63 Biblioteka Qt5 Gamepad ułatwia użycie kontrolerów w apikacjach Qt.
65 %package -n Qt5Gamepad-devel
66 Summary: Qt5 Gamepad library - development files
67 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad - pliki programistyczne
68 Group: Development/Libraries
69 Requires: Qt5Core-devel >= %{qtbase_ver}
70 Requires: Qt5Gamepad = %{version}-%{release}
72 %description -n Qt5Gamepad-devel
73 Qt5 Gamepad library - development files.
75 %description -n Qt5Gamepad-devel -l pl.UTF-8
76 Biblioteka Qt5 Gamepad - pliki programistyczne.
78 %package -n Qt5Gamepad-SDL2
79 Summary: The Qt5 Gamepad library plugin for SDL2
80 Summary(pl.UTF-8): Biblioteka Qt5 Gamepad - plugin do SDL2
82 Requires: Qt5Gamepad = %{version}-%{release}
84 %description -n Qt5Gamepad-SDL2
85 The Qt5 Gamepad library plugin for SDL2.
87 %description -n Qt5Gamepad-SDL2 -l pl.UTF-8
88 Biblioteka Qt5 Gamepad - plugin do SDL2.
91 Summary: Qt5 Gamepad documentation in HTML format
92 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML
94 Requires: qt5-doc-common >= %{qtbase_ver}
95 %if "%{_rpmversion}" >= "5"
100 Qt5 Gamepad documentation in HTML format.
102 %description doc -l pl.UTF-8
103 Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML.
106 Summary: Qt5 Gamepad documentation in QCH format
107 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH
109 Requires: qt5-doc-common >= %{qtbase_ver}
110 %if "%{_rpmversion}" >= "5"
115 Qt5 Gamepad documentation in QCH format.
117 %description doc-qch -l pl.UTF-8
118 Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH.
121 Summary: Qt5 Gamepad examples
122 Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Gamepad
123 Group: Development/Libraries
124 %if "%{_rpmversion}" >= "5"
128 %description examples
129 Qt5 Gamepad examples.
131 %description examples -l pl.UTF-8
132 Przykłady do biblioteki Qt5 Gamepad.
135 %setup -q -n %{orgname}-everywhere-src-%{version}
140 %{?with_doc:%{__make} docs}
143 rm -rf $RPM_BUILD_ROOT
145 INSTALL_ROOT=$RPM_BUILD_ROOT
148 %{__make} install_docs \
149 INSTALL_ROOT=$RPM_BUILD_ROOT
153 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
154 # actually drop *.la, follow policy of not packaging them when *.pc exist
155 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
157 # Prepare some files list
159 r="$RPM_BUILD_ROOT$2"
161 echo "%%dir $2" >> $1.files
162 elif [ -x "$r" ] ; then
163 echo "%%attr(755,root,root) $2" >> $1.files
164 elif [ -f "$r" ]; then
165 echo "$2" >> $1.files
167 echo "Error generation $1 files list!"
168 echo "$r: no such file or directory!"
174 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
179 echo "%defattr(644,root,root,755)" > examples.files
180 ifecho_tree examples %{_examplesdir}/qt5/gamepad
183 rm -rf $RPM_BUILD_ROOT
185 %post -n Qt5Gamepad -p /sbin/ldconfig
186 %postun -n Qt5Gamepad -p /sbin/ldconfig
189 %defattr(644,root,root,755)
190 %doc LICENSE.GPL dist/changes-*
191 %attr(755,root,root) %{_libdir}/libQt5Gamepad.so.*.*.*
192 %attr(755,root,root) %ghost %{_libdir}/libQt5Gamepad.so.5
193 %dir %{qt5dir}/qml/QtGamepad
194 %attr(755,root,root) %{qt5dir}/qml/QtGamepad/libdeclarative_gamepad.so
195 %{qt5dir}/qml/QtGamepad/plugins.qmltypes
196 %{qt5dir}/qml/QtGamepad/qmldir
197 %dir %{qt5dir}/plugins/gamepads
198 %attr(755,root,root) %{qt5dir}/plugins/gamepads/libevdevgamepad.so
200 %files -n Qt5Gamepad-devel
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libQt5Gamepad.so
203 %{_libdir}/libQt5Gamepad.prl
204 %{_includedir}/qt5/QtGamepad
205 %{_pkgconfigdir}/Qt5Gamepad.pc
206 %{_libdir}/cmake/Qt5Gamepad
207 %{qt5dir}/mkspecs/modules/qt_lib_gamepad.pri
208 %{qt5dir}/mkspecs/modules/qt_lib_gamepad_private.pri
210 %files -n Qt5Gamepad-SDL2
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{qt5dir}/plugins/gamepads/libsdl2gamepad.so
216 %defattr(644,root,root,755)
217 %{_docdir}/qt5-doc/qtgamepad
220 %defattr(644,root,root,755)
221 %{_docdir}/qt5-doc/qtgamepad.qch
224 %files examples -f examples.files
225 %defattr(644,root,root,755)
226 # XXX: dir shared with qt5-qtbase-examples
227 %dir %{_examplesdir}/qt5