]>
Commit | Line | Data |
---|---|---|
2950c847 WF |
1 | # TODO: |
2 | # - cleanup | |
c639f547 JB |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without qch # documentation in QCH format | |
2950c847 WF |
6 | |
7 | %define orgname qtserialport | |
c639f547 JB |
8 | %define qtbase_ver %{version} |
9 | %define qttools_ver %{version} | |
10 | Summary: The Qt5 SerialPort library | |
11 | Summary(pl.UTF-8): Biblioteka Qt5 SerialPort | |
2950c847 WF |
12 | Name: qt5-%{orgname} |
13 | Version: 5.2.0 | |
14 | Release: 0.1 | |
15 | License: LGPL v2.1 or GPL v3.0 | |
16 | Group: Libraries | |
17 | Source0: http://download.qt-project.org/official_releases/qt/5.2/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz | |
18 | # Source0-md5: 7b90e0707b698331226e662bd39945e9 | |
19 | URL: http://qt-project.org/ | |
c639f547 JB |
20 | BuildRequires: qt5-qtbase-devel = %{qtbase_ver} |
21 | BuildRequires: qt5-qttools-devel = %{qttools_ver} | |
22 | %if %{with qch} | |
23 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
24 | %endif | |
25 | BuildRequires: qt5-build >= %{qtbase_ver} | |
26 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
2950c847 | 27 | BuildRequires: rpmbuild(macros) >= 1.654 |
16017d76 ER |
28 | BuildRequires: tar >= 1:1.22 |
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} | |
55 | Obsoletes: qt5-qtserialport | |
2950c847 | 56 | |
c639f547 JB |
57 | %description -n Qt5SerialPort |
58 | Qt5 SerialPort library provides [...] | |
59 | ||
60 | %description -n Qt5SerialPort -l pl.UTF_8 | |
61 | Biblioteka Qt5 SerialPort [...] | |
62 | ||
63 | %package -n Qt5SerialPort-devel | |
64 | Summary: Qt5 SerialPort library - development files | |
65 | Summary(pl.UTF-8): Biblioteka Qt5 SerialPort - pliki programistyczne | |
2950c847 | 66 | Group: Development/Libraries |
c639f547 JB |
67 | Requires: Qt5Core-devel >= %{qtbase_ver} |
68 | Requires: Qt5SerialPort = %{version}-%{release} | |
69 | Obsoletes: qt5-qtserialport-devel | |
70 | ||
71 | %description -n Qt5SerialPort-devel | |
72 | Qt5 SerialPort library - development files. | |
2950c847 | 73 | |
c639f547 JB |
74 | %description -n Qt5SerialPort-devel -l pl.UTF-8 |
75 | Biblioteka Qt5 SerialPort - pliki programistyczne. | |
2950c847 WF |
76 | |
77 | %package doc | |
c639f547 JB |
78 | Summary: Qt5 SerialPort documentation in HTML format |
79 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML | |
2950c847 | 80 | Group: Documentation |
c639f547 | 81 | Requires: qt5-doc-common >= %{qtbase_ver} |
16017d76 ER |
82 | %if "%{_rpmversion}" >= "5" |
83 | BuildArch: noarch | |
84 | %endif | |
2950c847 WF |
85 | |
86 | %description doc | |
c639f547 JB |
87 | Qt5 SerialPort documentation in HTML format. |
88 | ||
89 | %description doc -l pl.UTF-8 | |
90 | Dokumentacja do biblioteki Qt5 SerialPort w formacie HTML. | |
91 | ||
92 | %package doc-qch | |
93 | Summary: Qt5 SerialPort documentation in QCH format | |
94 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH | |
95 | Group: Documentation | |
96 | Requires: qt5-doc-common >= %{qtbase_ver} | |
97 | %if "%{_rpmversion}" >= "5" | |
98 | BuildArch: noarch | |
99 | %endif | |
100 | ||
101 | %description doc-qch | |
102 | Qt5 SerialPort documentation in QCH format. | |
103 | ||
104 | %description doc-qch -l pl.UTF-8 | |
105 | Dokumentacja do biblioteki Qt5 SerialPort w formacie QCH. | |
2950c847 WF |
106 | |
107 | %package examples | |
c639f547 JB |
108 | Summary: Qt5 SerialPort examples |
109 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 SerialPort | |
2950c847 | 110 | Group: Development/Libraries |
16017d76 ER |
111 | %if "%{_rpmversion}" >= "5" |
112 | BuildArch: noarch | |
113 | %endif | |
2950c847 WF |
114 | |
115 | %description examples | |
c639f547 JB |
116 | Qt5 SerialPort examples. |
117 | ||
118 | %description examples -l pl.UTF-8 | |
119 | Przykłady do biblioteki Qt5 SerialPort. | |
2950c847 WF |
120 | |
121 | %prep | |
122 | %setup -q -n %{orgname}-opensource-src-%{version} | |
123 | ||
124 | %build | |
125 | qmake-qt5 | |
126 | %{__make} | |
c639f547 | 127 | %{__make} %{!?with_qch:html_}docs |
2950c847 WF |
128 | |
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | %{__make} install \ | |
132 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
133 | ||
c639f547 | 134 | %{__make} install_%{!?with_qch:html_}docs \ |
2950c847 WF |
135 | INSTALL_ROOT=$RPM_BUILD_ROOT |
136 | ||
c639f547 JB |
137 | # useless symlinks |
138 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
139 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
140 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
141 | ||
2950c847 WF |
142 | %clean |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
c639f547 JB |
145 | %post -n Qt5SerialPort -p /sbin/ldconfig |
146 | %postun -n Qt5SerialPort -p /sbin/ldconfig | |
2950c847 | 147 | |
c639f547 | 148 | %files -n Qt5SerialPort |
2950c847 | 149 | %defattr(644,root,root,755) |
c639f547 JB |
150 | %attr(755,root,root) %{_libdir}/libQt5SerialPort.so.*.*.* |
151 | %attr(755,root,root) %ghost %{_libdir}/libQt5SerialPort.so.5 | |
152 | #%attr(755,root,root) %{qt5dir}/plugins | |
2950c847 | 153 | |
c639f547 | 154 | %files -n Qt5SerialPort-devel |
2950c847 WF |
155 | %defattr(644,root,root,755) |
156 | %attr(755,root,root) %{_libdir}/libQt5SerialPort.so | |
2950c847 | 157 | %{_libdir}/libQt5SerialPort.prl |
2950c847 | 158 | %{_includedir}/qt5/QtSerialPort |
c639f547 JB |
159 | %{_pkgconfigdir}/Qt5SerialPort.pc |
160 | %{_libdir}/cmake/Qt5SerialPort | |
161 | %{qt5dir}/mkspecs/modules/*.pri | |
2950c847 WF |
162 | |
163 | %files doc | |
164 | %defattr(644,root,root,755) | |
c639f547 JB |
165 | %{_docdir}/qt5-doc/qtserialport |
166 | ||
167 | %if %{with qch} | |
168 | %files doc-qch | |
169 | %defattr(644,root,root,755) | |
170 | %{_docdir}/qt5-doc/qtserialport.qch | |
171 | %endif | |
2950c847 WF |
172 | |
173 | #%files examples -f examples.files |