]>
Commit | Line | Data |
---|---|---|
c639f547 JB |
1 | # |
2 | # Conditional build: | |
60cff228 | 3 | %bcond_without doc # Documentation |
2950c847 WF |
4 | |
5 | %define orgname qtserialport | |
c639f547 JB |
6 | %define qtbase_ver %{version} |
7 | %define qttools_ver %{version} | |
8 | Summary: The Qt5 SerialPort library | |
9 | Summary(pl.UTF-8): Biblioteka Qt5 SerialPort | |
2950c847 | 10 | Name: qt5-%{orgname} |
0ee4cc14 | 11 | Version: 5.15.2 |
3c3efeda | 12 | Release: 3 |
b0bfa8d4 | 13 | License: LGPL v3 or GPL v2 or GPL v3 or commercial |
2950c847 | 14 | Group: Libraries |
3738fb7c | 15 | Source0: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz |
0ee4cc14 | 16 | # Source0-md5: ae1506fc8adc811e0aefff9aff70de3b |
b0bfa8d4 | 17 | URL: https://www.qt.io/ |
528b6ebb JB |
18 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
19 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
20 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
60cff228 | 21 | %if %{with doc} |
c639f547 JB |
22 | BuildRequires: qt5-assistant >= %{qttools_ver} |
23 | %endif | |
24 | BuildRequires: qt5-build >= %{qtbase_ver} | |
25 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
b0bfa8d4 | 26 | BuildRequires: rpmbuild(macros) >= 1.752 |
16017d76 | 27 | BuildRequires: tar >= 1:1.22 |
528b6ebb | 28 | BuildRequires: udev-devel |
16017d76 | 29 | BuildRequires: xz |
2950c847 WF |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
2950c847 | 32 | %define specflags -fno-strict-aliasing |
c639f547 | 33 | %define qt5dir %{_libdir}/qt5 |
2950c847 WF |
34 | |
35 | %description | |
c639f547 JB |
36 | Qt is a cross-platform application and UI framework. Using Qt, you can |
37 | write web-enabled applications once and deploy them across desktop, | |
38 | mobile and embedded systems without rewriting the source code. | |
39 | ||
40 | This package contains Qt5 SerialPort library. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
44 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
45 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
46 | źródłowego. | |
47 | ||
48 | Ten pakiet zawiera bibliotekę Qt5 SerialPort. | |
49 | ||
50 | %package -n Qt5SerialPort | |
51 | Summary: The Qt5 SerialPort library | |
52 | Summary(pl.UTF-8): Biblioteka Qt5 SerialPort | |
53 | Group: Libraries | |
54 | Requires: Qt5Core >= %{qtbase_ver} | |
ff9bdc94 | 55 | Obsoletes: qt5-qtserialport < 5.2.0-1 |
2950c847 | 56 | |
c639f547 | 57 | %description -n Qt5SerialPort |
528b6ebb JB |
58 | Qt5 SerialPort library provides classes that enable access to a serial |
59 | port. | |
c639f547 | 60 | |
d0442c6b | 61 | %description -n Qt5SerialPort -l pl.UTF-8 |
528b6ebb JB |
62 | Biblioteka Qt5 SerialPort udostępnia klasy pozwalające na dostęp do |
63 | portu szeregowego. | |
c639f547 JB |
64 | |
65 | %package -n Qt5SerialPort-devel | |
66 | Summary: Qt5 SerialPort library - development files | |
67 | Summary(pl.UTF-8): Biblioteka Qt5 SerialPort - pliki programistyczne | |
2950c847 | 68 | Group: Development/Libraries |
c639f547 JB |
69 | Requires: Qt5Core-devel >= %{qtbase_ver} |
70 | Requires: Qt5SerialPort = %{version}-%{release} | |
528b6ebb | 71 | Requires: udev-devel |
ff9bdc94 | 72 | Obsoletes: qt5-qtserialport-devel < 5.2.0-1 |
c639f547 JB |
73 | |
74 | %description -n Qt5SerialPort-devel | |
75 | Qt5 SerialPort library - development files. | |
2950c847 | 76 | |
c639f547 JB |
77 | %description -n Qt5SerialPort-devel -l pl.UTF-8 |
78 | Biblioteka Qt5 SerialPort - pliki programistyczne. | |
2950c847 WF |
79 | |
80 | %package doc | |
c639f547 JB |
81 | Summary: Qt5 SerialPort documentation in HTML format |
82 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML | |
2950c847 | 83 | Group: Documentation |
c639f547 | 84 | Requires: qt5-doc-common >= %{qtbase_ver} |
d833939e | 85 | BuildArch: noarch |
2950c847 WF |
86 | |
87 | %description doc | |
c639f547 JB |
88 | Qt5 SerialPort documentation in HTML format. |
89 | ||
90 | %description doc -l pl.UTF-8 | |
91 | Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML. | |
92 | ||
93 | %package doc-qch | |
94 | Summary: Qt5 SerialPort documentation in QCH format | |
95 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH | |
96 | Group: Documentation | |
97 | Requires: qt5-doc-common >= %{qtbase_ver} | |
d833939e | 98 | BuildArch: noarch |
c639f547 JB |
99 | |
100 | %description doc-qch | |
101 | Qt5 SerialPort documentation in QCH format. | |
102 | ||
103 | %description doc-qch -l pl.UTF-8 | |
104 | Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH. | |
2950c847 WF |
105 | |
106 | %package examples | |
c639f547 JB |
107 | Summary: Qt5 SerialPort examples |
108 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 SerialPort | |
2950c847 | 109 | Group: Development/Libraries |
d833939e | 110 | BuildArch: noarch |
2950c847 WF |
111 | |
112 | %description examples | |
c639f547 JB |
113 | Qt5 SerialPort examples. |
114 | ||
115 | %description examples -l pl.UTF-8 | |
116 | Przykłady do biblioteki Qt5 SerialPort. | |
2950c847 WF |
117 | |
118 | %prep | |
2c1c02e2 | 119 | %setup -q -n %{orgname}-everywhere-src-%{version} |
2950c847 WF |
120 | |
121 | %build | |
122 | qmake-qt5 | |
123 | %{__make} | |
60cff228 | 124 | %{?with_doc:%{__make} docs} |
2950c847 WF |
125 | |
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
41265dd1 | 128 | |
2950c847 WF |
129 | %{__make} install \ |
130 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
131 | ||
60cff228 JR |
132 | %if %{with doc} |
133 | %{__make} install_docs \ | |
2950c847 | 134 | INSTALL_ROOT=$RPM_BUILD_ROOT |
60cff228 | 135 | %endif |
2950c847 | 136 | |
c639f547 | 137 | # useless symlinks |
2c1c02e2 | 138 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
c639f547 JB |
139 | # actually drop *.la, follow policy of not packaging them when *.pc exist |
140 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
141 | ||
41265dd1 JB |
142 | # Prepare some files list |
143 | ifecho() { | |
144 | r="$RPM_BUILD_ROOT$2" | |
145 | if [ -d "$r" ]; then | |
146 | echo "%%dir $2" >> $1.files | |
147 | elif [ -x "$r" ] ; then | |
148 | echo "%%attr(755,root,root) $2" >> $1.files | |
149 | elif [ -f "$r" ]; then | |
150 | echo "$2" >> $1.files | |
151 | else | |
152 | echo "Error generation $1 files list!" | |
153 | echo "$r: no such file or directory!" | |
154 | return 1 | |
155 | fi | |
156 | } | |
157 | ifecho_tree() { | |
158 | ifecho $1 $2 | |
159 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
160 | ifecho $1 $2/$f | |
161 | done | |
162 | } | |
163 | ||
164 | echo "%defattr(644,root,root,755)" > examples.files | |
165 | ifecho_tree examples %{_examplesdir}/qt5/serialport | |
166 | ||
2950c847 WF |
167 | %clean |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
c639f547 JB |
170 | %post -n Qt5SerialPort -p /sbin/ldconfig |
171 | %postun -n Qt5SerialPort -p /sbin/ldconfig | |
2950c847 | 172 | |
c639f547 | 173 | %files -n Qt5SerialPort |
2950c847 | 174 | %defattr(644,root,root,755) |
2c1c02e2 | 175 | %doc LICENSE.GPL3-EXCEPT dist/changes-* |
c639f547 JB |
176 | %attr(755,root,root) %{_libdir}/libQt5SerialPort.so.*.*.* |
177 | %attr(755,root,root) %ghost %{_libdir}/libQt5SerialPort.so.5 | |
2950c847 | 178 | |
c639f547 | 179 | %files -n Qt5SerialPort-devel |
2950c847 WF |
180 | %defattr(644,root,root,755) |
181 | %attr(755,root,root) %{_libdir}/libQt5SerialPort.so | |
2950c847 | 182 | %{_libdir}/libQt5SerialPort.prl |
2950c847 | 183 | %{_includedir}/qt5/QtSerialPort |
c639f547 JB |
184 | %{_pkgconfigdir}/Qt5SerialPort.pc |
185 | %{_libdir}/cmake/Qt5SerialPort | |
528b6ebb JB |
186 | %{qt5dir}/mkspecs/modules/qt_lib_serialport.pri |
187 | %{qt5dir}/mkspecs/modules/qt_lib_serialport_private.pri | |
2950c847 | 188 | |
60cff228 | 189 | %if %{with doc} |
2950c847 WF |
190 | %files doc |
191 | %defattr(644,root,root,755) | |
c639f547 JB |
192 | %{_docdir}/qt5-doc/qtserialport |
193 | ||
c639f547 JB |
194 | %files doc-qch |
195 | %defattr(644,root,root,755) | |
196 | %{_docdir}/qt5-doc/qtserialport.qch | |
197 | %endif | |
2950c847 | 198 | |
41265dd1 JB |
199 | %files examples -f examples.files |
200 | %defattr(644,root,root,755) | |
201 | # XXX: dir shared with qt5-qtbase-examples | |
202 | %dir %{_examplesdir}/qt5 |