]>
Commit | Line | Data |
---|---|---|
4ebefc1c BS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Documentation | |
4 | ||
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 | |
10 | Name: qt5-%{orgname} | |
76bd078f | 11 | Version: 5.13.0 |
4ebefc1c BS |
12 | Release: 1 |
13 | License: GPL v3.0 or LGPLv3 | |
14 | Group: Libraries | |
76bd078f JP |
15 | Source0: http://download.qt.io/official_releases/qt/5.13/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz |
16 | # Source0-md5: 729c3934be6e1d8c1d28f3dfdd9b2238 | |
4ebefc1c BS |
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 | |
23 | %if %{with doc} | |
24 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
25 | %endif | |
26 | BuildRequires: qt5-build >= %{qtbase_ver} | |
27 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
28 | BuildRequires: rpmbuild(macros) >= 1.654 | |
29 | BuildRequires: tar >= 1:1.22 | |
30 | BuildRequires: xz | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %define specflags -fno-strict-aliasing | |
34 | %define qt5dir %{_libdir}/qt5 | |
35 | ||
36 | %description | |
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. | |
40 | ||
41 | This package contains Qt5 Gamepad library. | |
42 | ||
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 | |
47 | źródłowego. | |
48 | ||
49 | Ten pakiet zawiera bibliotekę Qt5 Gamepad. | |
50 | ||
51 | %package -n Qt5Gamepad | |
52 | Summary: The Qt5 Gamepad library | |
53 | Summary(pl.UTF-8): Biblioteka Qt5 Gamepad | |
54 | Group: Libraries | |
55 | Requires: Qt5Core >= %{qtbase_ver} | |
56 | ||
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 | |
60 | equipment. | |
61 | ||
62 | %description -n Qt5Gamepad -l pl.UTF-8 | |
63 | Biblioteka Qt5 Gamepad ułatwia użycie kontrolerów w apikacjach Qt. | |
64 | ||
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} | |
71 | ||
72 | %description -n Qt5Gamepad-devel | |
73 | Qt5 Gamepad library - development files. | |
74 | ||
75 | %description -n Qt5Gamepad-devel -l pl.UTF-8 | |
76 | Biblioteka Qt5 Gamepad - pliki programistyczne. | |
77 | ||
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 | |
81 | Group: Libraries | |
82 | Requires: Qt5Gamepad = %{version}-%{release} | |
83 | ||
84 | %description -n Qt5Gamepad-SDL2 | |
85 | The Qt5 Gamepad library plugin for SDL2. | |
86 | ||
87 | %description -n Qt5Gamepad-SDL2 -l pl.UTF-8 | |
88 | Biblioteka Qt5 Gamepad - plugin do SDL2. | |
89 | ||
90 | %package doc | |
91 | Summary: Qt5 Gamepad documentation in HTML format | |
92 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML | |
93 | Group: Documentation | |
94 | Requires: qt5-doc-common >= %{qtbase_ver} | |
95 | %if "%{_rpmversion}" >= "5" | |
96 | BuildArch: noarch | |
97 | %endif | |
98 | ||
99 | %description doc | |
100 | Qt5 Gamepad documentation in HTML format. | |
101 | ||
102 | %description doc -l pl.UTF-8 | |
103 | Dokumentacja do biblioteki Qt5 Gamepad w formacie HTML. | |
104 | ||
105 | %package doc-qch | |
106 | Summary: Qt5 Gamepad documentation in QCH format | |
107 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH | |
108 | Group: Documentation | |
109 | Requires: qt5-doc-common >= %{qtbase_ver} | |
110 | %if "%{_rpmversion}" >= "5" | |
111 | BuildArch: noarch | |
112 | %endif | |
113 | ||
114 | %description doc-qch | |
115 | Qt5 Gamepad documentation in QCH format. | |
116 | ||
117 | %description doc-qch -l pl.UTF-8 | |
118 | Dokumentacja do biblioteki Qt5 Gamepad w formacie QCH. | |
119 | ||
120 | %package examples | |
121 | Summary: Qt5 Gamepad examples | |
122 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Gamepad | |
123 | Group: Development/Libraries | |
124 | %if "%{_rpmversion}" >= "5" | |
125 | BuildArch: noarch | |
126 | %endif | |
127 | ||
128 | %description examples | |
129 | Qt5 Gamepad examples. | |
130 | ||
131 | %description examples -l pl.UTF-8 | |
132 | Przykłady do biblioteki Qt5 Gamepad. | |
133 | ||
134 | %prep | |
135 | %setup -q -n %{orgname}-everywhere-src-%{version} | |
136 | ||
137 | %build | |
138 | qmake-qt5 | |
139 | %{__make} | |
140 | %{?with_doc:%{__make} docs} | |
141 | ||
142 | %install | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | %{__make} install \ | |
145 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
146 | ||
147 | %if %{with doc} | |
148 | %{__make} install_docs \ | |
149 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
150 | %endif | |
151 | ||
152 | # useless symlinks | |
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 | |
156 | ||
157 | # Prepare some files list | |
158 | ifecho() { | |
159 | r="$RPM_BUILD_ROOT$2" | |
160 | if [ -d "$r" ]; then | |
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 | |
166 | else | |
167 | echo "Error generation $1 files list!" | |
168 | echo "$r: no such file or directory!" | |
169 | return 1 | |
170 | fi | |
171 | } | |
172 | ifecho_tree() { | |
173 | ifecho $1 $2 | |
174 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
175 | ifecho $1 $2/$f | |
176 | done | |
177 | } | |
178 | ||
179 | echo "%defattr(644,root,root,755)" > examples.files | |
180 | ifecho_tree examples %{_examplesdir}/qt5/gamepad | |
181 | ||
182 | %clean | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %post -n Qt5Gamepad -p /sbin/ldconfig | |
186 | %postun -n Qt5Gamepad -p /sbin/ldconfig | |
187 | ||
188 | %files -n Qt5Gamepad | |
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 | |
199 | ||
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 | |
209 | ||
210 | %files -n Qt5Gamepad-SDL2 | |
211 | %defattr(644,root,root,755) | |
212 | %attr(755,root,root) %{qt5dir}/plugins/gamepads/libsdl2gamepad.so | |
213 | ||
214 | %if %{with doc} | |
215 | %files doc | |
216 | %defattr(644,root,root,755) | |
217 | %{_docdir}/qt5-doc/qtgamepad | |
218 | ||
219 | %files doc-qch | |
220 | %defattr(644,root,root,755) | |
221 | %{_docdir}/qt5-doc/qtgamepad.qch | |
222 | %endif | |
223 | ||
224 | %files examples -f examples.files | |
225 | %defattr(644,root,root,755) | |
226 | # XXX: dir shared with qt5-qtbase-examples | |
227 | %dir %{_examplesdir}/qt5 |