]> git.pld-linux.org Git - packages/qt5-qtgamepad.git/blob - qt5-qtgamepad.spec
6b038914ef1d9c315c4eda331ad5a9f64cd0b28f
[packages/qt5-qtgamepad.git] / qt5-qtgamepad.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Documentation
4
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
11 Name:           qt5-%{orgname}
12 Version:        5.15.11
13 Release:        1
14 License:        LGPL v3 or GPL v2+ or commercial
15 Group:          Libraries
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
25 %if %{with doc}
26 BuildRequires:  qt5-assistant >= %{qttools_ver}
27 %endif
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
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}
59 Requires:       Qt5Gui >= %{qtbase_ver}
60 Requires:       Qt5Qml-devel >= %{qtdeclarative_ver}
61 Requires:       Qt5Quick-devel >= %{qtdeclarative_ver}
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}
76 Requires:       Qt5Gui-devel >= %{qtbase_ver}
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
100 License:        FDL v1.3
101 Group:          Documentation
102 Requires:       qt5-doc-common >= %{qtbase_ver}
103 BuildArch:      noarch
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
114 License:        FDL v1.3
115 Group:          Documentation
116 Requires:       qt5-doc-common >= %{qtbase_ver}
117 BuildArch:      noarch
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
128 License:        BSD or commercial
129 Group:          Development/Libraries
130 BuildArch:      noarch
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
142 %{qmake_qt5}
143 %{__make}
144 %{?with_doc:%{__make} docs}
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148
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)
195 %doc README.md dist/changes-*
196 # R: Qt5Core Qt5Gui
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
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
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
219
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
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
This page took 0.060257 seconds and 2 git commands to generate.