3 %bcond_without doc # Documentation
5 %define orgname qtserialport
6 %define qtbase_ver %{version}
7 %define qttools_ver %{version}
8 Summary: The Qt5 SerialPort library
9 Summary(pl.UTF-8): Biblioteka Qt5 SerialPort
13 License: LGPL v3 or GPL v2 or GPL v3 or commercial
15 Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
16 # Source0-md5: 92586ba6389363101519399372d3b43e
17 URL: https://www.qt.io/
18 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
19 BuildRequires: Qt5Gui-devel >= %{qtbase_ver}
20 BuildRequires: Qt5Widgets-devel >= %{qtbase_ver}
22 BuildRequires: qt5-assistant >= %{qttools_ver}
24 BuildRequires: qt5-build >= %{qtbase_ver}
25 BuildRequires: qt5-qmake >= %{qtbase_ver}
26 BuildRequires: rpm-build >= 4.6
27 BuildRequires: rpmbuild(macros) >= 2.016
28 BuildRequires: tar >= 1:1.22
29 BuildRequires: udev-devel
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 SerialPort 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 SerialPort.
51 %package -n Qt5SerialPort
52 Summary: The Qt5 SerialPort library
53 Summary(pl.UTF-8): Biblioteka Qt5 SerialPort
55 %requires_eq_to Qt5Core Qt5Core-devel
56 Obsoletes: qt5-qtserialport < 5.2.0-1
58 %description -n Qt5SerialPort
59 Qt5 SerialPort library provides classes that enable access to a serial
62 %description -n Qt5SerialPort -l pl.UTF-8
63 Biblioteka Qt5 SerialPort udostępnia klasy pozwalające na dostęp do
66 %package -n Qt5SerialPort-devel
67 Summary: Qt5 SerialPort library - development files
68 Summary(pl.UTF-8): Biblioteka Qt5 SerialPort - pliki programistyczne
69 Group: Development/Libraries
70 Requires: Qt5Core-devel >= %{qtbase_ver}
71 Requires: Qt5SerialPort = %{version}-%{release}
73 Obsoletes: qt5-qtserialport-devel < 5.2.0-1
75 %description -n Qt5SerialPort-devel
76 Qt5 SerialPort library - development files.
78 %description -n Qt5SerialPort-devel -l pl.UTF-8
79 Biblioteka Qt5 SerialPort - pliki programistyczne.
82 Summary: Qt5 SerialPort documentation in HTML format
83 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML
85 Requires: qt5-doc-common >= %{qtbase_ver}
89 Qt5 SerialPort documentation in HTML format.
91 %description doc -l pl.UTF-8
92 Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML.
95 Summary: Qt5 SerialPort documentation in QCH format
96 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH
98 Requires: qt5-doc-common >= %{qtbase_ver}
102 Qt5 SerialPort documentation in QCH format.
104 %description doc-qch -l pl.UTF-8
105 Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH.
108 Summary: Qt5 SerialPort examples
109 Summary(pl.UTF-8): Przykłady do biblioteki Qt5 SerialPort
110 Group: Development/Libraries
113 %description examples
114 Qt5 SerialPort examples.
116 %description examples -l pl.UTF-8
117 Przykłady do biblioteki Qt5 SerialPort.
120 %setup -q -n %{orgname}-everywhere-src-%{version}
125 %{?with_doc:%{__make} docs}
128 rm -rf $RPM_BUILD_ROOT
131 INSTALL_ROOT=$RPM_BUILD_ROOT
134 %{__make} install_docs \
135 INSTALL_ROOT=$RPM_BUILD_ROOT
139 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
140 # actually drop *.la, follow policy of not packaging them when *.pc exist
141 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
143 # Prepare some files list
145 r="$RPM_BUILD_ROOT$2"
147 echo "%%dir $2" >> $1.files
148 elif [ -x "$r" ] ; then
149 echo "%%attr(755,root,root) $2" >> $1.files
150 elif [ -f "$r" ]; then
151 echo "$2" >> $1.files
153 echo "Error generation $1 files list!"
154 echo "$r: no such file or directory!"
160 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
165 echo "%defattr(644,root,root,755)" > examples.files
166 ifecho_tree examples %{_examplesdir}/qt5/serialport
169 rm -rf $RPM_BUILD_ROOT
171 %post -n Qt5SerialPort -p /sbin/ldconfig
172 %postun -n Qt5SerialPort -p /sbin/ldconfig
174 %files -n Qt5SerialPort
175 %defattr(644,root,root,755)
176 %doc LICENSE.GPL3-EXCEPT dist/changes-*
177 %attr(755,root,root) %{_libdir}/libQt5SerialPort.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libQt5SerialPort.so.5
180 %files -n Qt5SerialPort-devel
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libQt5SerialPort.so
183 %{_libdir}/libQt5SerialPort.prl
184 %{_includedir}/qt5/QtSerialPort
185 %{_pkgconfigdir}/Qt5SerialPort.pc
186 %{_libdir}/cmake/Qt5SerialPort
187 %{qt5dir}/mkspecs/modules/qt_lib_serialport.pri
188 %{qt5dir}/mkspecs/modules/qt_lib_serialport_private.pri
192 %defattr(644,root,root,755)
193 %{_docdir}/qt5-doc/qtserialport
196 %defattr(644,root,root,755)
197 %{_docdir}/qt5-doc/qtserialport.qch
200 %files examples -f examples.files
201 %defattr(644,root,root,755)
202 # XXX: dir shared with qt5-qtbase-examples
203 %dir %{_examplesdir}/qt5