]>
Commit | Line | Data |
---|---|---|
69077e7e ER |
1 | # |
2 | # Conditional build: | |
02f0b2ba JB |
3 | %bcond_without qt4 # Qt4 based library |
4 | %bcond_without qt5 # Qt5 based library | |
69077e7e | 5 | |
02f0b2ba JB |
6 | Summary: QtIOCompressor - a QIODevice that compresses data streams |
7 | Summary(pl.UTF-8): QtIOCompressor - QIODevice kompresujące strumienie danych | |
a619a4ab ER |
8 | Name: QtIOCompressor |
9 | Version: 2.3 | |
02f0b2ba JB |
10 | Release: 4 |
11 | License: GPL v3 or LGPL v2 with Nokia Qt LGPL exception v1.1 | |
a619a4ab | 12 | Group: Libraries |
a619a4ab ER |
13 | Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtiocompressor-%{version}_1-opensource.tar.gz |
14 | # Source0-md5: 73bbde56cf705602b4f180b379756a40 | |
15 | Source1: qtiocompressor.prf | |
16 | Patch0: libs.patch | |
02f0b2ba | 17 | Patch1: %{name}-qmake.patch |
105a26c0 | 18 | URL: http://doc.qt.digia.com/solutions/4/qtiocompressor/qtiocompressor.html |
69077e7e ER |
19 | BuildRequires: sed >= 4.0 |
20 | %if %{with qt4} | |
02f0b2ba JB |
21 | BuildRequires: QtCore-devel >= 4 |
22 | BuildRequires: QtGui-devel >= 4 | |
23 | BuildRequires: qt4-build >= 4 | |
24 | BuildRequires: qt4-qmake >= 4 | |
69077e7e ER |
25 | %endif |
26 | %if %{with qt5} | |
02f0b2ba JB |
27 | BuildRequires: Qt5Core-devel >= 5 |
28 | BuildRequires: Qt5Gui-devel >= 5 | |
29 | BuildRequires: qt5-build >= 5 | |
30 | BuildRequires: qt5-qmake >= 5.5 | |
69077e7e | 31 | %endif |
a619a4ab ER |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
02f0b2ba JB |
34 | %define qt4mkspecsdir %{_datadir}/qt4/mkspecs |
35 | %define qt5mkspecsdir %{_libdir}/qt5/mkspecs | |
a619a4ab ER |
36 | |
37 | %description | |
38 | The class works on top of a QIODevice subclass, compressing data | |
39 | before it is written and decompressing it when it is read. | |
40 | ||
41 | Since QtIOCompressor works on streams, it does not have to see the | |
42 | entire data set before compressing or decompressing it. This can | |
43 | reduce the memory requirements when working on large data sets. | |
44 | ||
02f0b2ba JB |
45 | %description -l pl.UTF-8 |
46 | Klasa działająca ponad podklasą QIODevice, kompresująca dane zanim | |
47 | są zapisywane i dekompresująca przy odczycie. | |
48 | ||
49 | Ponieważ QtIOCompressor działa na strumieniach, nie musi widzieć | |
50 | całego zbioru danych przed kompresją czy dekompresją. Może to | |
51 | zmniejszyć wymagania pamięciowe przy pracy z dużą ilością danych. | |
52 | ||
a619a4ab ER |
53 | %package devel |
54 | Summary: Development files for QtIOCompressor | |
02f0b2ba | 55 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QtIOCompressor |
a619a4ab ER |
56 | Group: Development/Libraries |
57 | Requires: %{name} = %{version}-%{release} | |
02f0b2ba | 58 | Requires: QtCore-devel >= 4 |
a619a4ab ER |
59 | |
60 | %description devel | |
02f0b2ba JB |
61 | This package contains the header files for developing applications |
62 | that use QtIOCompressor. | |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
66 | korzystających z biblioteki QtIOCompressor. | |
a619a4ab | 67 | |
69077e7e | 68 | %package -n Qt5IOCompressor |
02f0b2ba JB |
69 | Summary: Qt5IOCompressor - a QIODevice that compresses data streams |
70 | Summary(pl.UTF-8): Qt5IOCompressor - QIODevice kompresujące strumienie danych | |
69077e7e ER |
71 | Group: Libraries |
72 | ||
73 | %description -n Qt5IOCompressor | |
74 | The class works on top of a QIODevice subclass, compressing data | |
75 | before it is written and decompressing it when it is read. | |
76 | ||
77 | Since QtIOCompressor works on streams, it does not have to see the | |
78 | entire data set before compressing or decompressing it. This can | |
79 | reduce the memory requirements when working on large data sets. | |
80 | ||
02f0b2ba JB |
81 | %description -n Qt5IOCompressor -l pl.UTF-8 |
82 | Klasa działająca ponad podklasą QIODevice, kompresująca dane zanim | |
83 | są zapisywane i dekompresująca przy odczycie. | |
84 | ||
85 | Ponieważ QtIOCompressor działa na strumieniach, nie musi widzieć | |
86 | całego zbioru danych przed kompresją czy dekompresją. Może to | |
87 | zmniejszyć wymagania pamięciowe przy pracy z dużą ilością danych. | |
88 | ||
69077e7e ER |
89 | %package -n Qt5IOCompressor-devel |
90 | Summary: Development files for Qt5IOCompressor | |
02f0b2ba | 91 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Qt5IOCompressor |
69077e7e | 92 | Group: Development/Libraries |
02f0b2ba | 93 | Requires: Qt5Core-devel >= 5 |
69077e7e | 94 | Requires: Qt5IOCompressor = %{version}-%{release} |
69077e7e ER |
95 | |
96 | %description -n Qt5IOCompressor-devel | |
02f0b2ba JB |
97 | This package contains the header files for developing applications |
98 | that use Qt5IOCompressor. | |
99 | ||
100 | %description -n Qt5IOCompressor-devel -l pl.UTF-8 | |
101 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
102 | korzystających z biblioteki Qt5IOCompressor. | |
69077e7e | 103 | |
a619a4ab ER |
104 | %prep |
105 | %setup -q -n qtiocompressor-%{version}_1-opensource | |
106 | %patch0 -p1 | |
02f0b2ba | 107 | %patch1 -p1 |
a619a4ab ER |
108 | |
109 | # skip building examples | |
110 | %{__sed} -i -e '/^SUBDIRS+=examples$/d' *.pro | |
111 | ||
a619a4ab | 112 | touch .licenseAccepted |
69077e7e | 113 | |
69077e7e | 114 | %build |
a619a4ab | 115 | # Does not use GNU configure |
69077e7e | 116 | ./configure -library |
02f0b2ba JB |
117 | |
118 | %if %{with qt4} | |
119 | install -d build-qt4 | |
120 | cd build-qt4 | |
121 | qmake-qt4 ../qtiocompressor.pro \ | |
122 | QMAKE_CXX="%{__cxx}" \ | |
123 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
124 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \ | |
125 | INSTALL_LIBDIR=%{_libdir} | |
a619a4ab | 126 | %{__make} |
69077e7e ER |
127 | cd .. |
128 | %endif | |
129 | ||
130 | %if %{with qt5} | |
02f0b2ba | 131 | install -d build-qt5 |
69077e7e | 132 | cd build-qt5 |
02f0b2ba JB |
133 | qmake-qt5 ../qtiocompressor.pro \ |
134 | QMAKE_CXX="%{__cxx}" \ | |
135 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
136 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \ | |
137 | INSTALL_LIBDIR=%{_libdir} | |
69077e7e ER |
138 | %{__make} |
139 | cd .. | |
140 | %endif | |
a619a4ab ER |
141 | |
142 | %install | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
69077e7e | 145 | %if %{with qt4} |
02f0b2ba JB |
146 | %{__make} -C build-qt4 install \ |
147 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
148 | ||
149 | install -d $RPM_BUILD_ROOT{%{_includedir}/qt4/QtSolutions,%{qt4mkspecsdir}/features} | |
105a26c0 | 150 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions |
02f0b2ba JB |
151 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4mkspecsdir}/features |
152 | ||
153 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQtSolutions_*.so.1.0 | |
69077e7e ER |
154 | %endif |
155 | ||
156 | %if %{with qt5} | |
02f0b2ba JB |
157 | %{__make} -C build-qt5 install \ |
158 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
159 | ||
160 | install -d $RPM_BUILD_ROOT{%{_includedir}/qt5/QtSolutions,%{qt5mkspecsdir}/features} | |
69077e7e | 161 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions |
02f0b2ba JB |
162 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt5mkspecsdir}/features |
163 | ||
164 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5Solutions_*.so.1.0 | |
69077e7e | 165 | %endif |
a619a4ab ER |
166 | |
167 | %clean | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
170 | %post -p /sbin/ldconfig | |
171 | %postun -p /sbin/ldconfig | |
172 | ||
fa03d4ca ER |
173 | %post -n Qt5IOCompressor -p /sbin/ldconfig |
174 | %postun -n Qt5IOCompressor -p /sbin/ldconfig | |
175 | ||
9156e87a | 176 | %if %{with qt4} |
a619a4ab ER |
177 | %files |
178 | %defattr(644,root,root,755) | |
02f0b2ba | 179 | %doc LGPL_EXCEPTION.txt README.TXT |
a619a4ab ER |
180 | %attr(755,root,root) %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.*.*.* |
181 | %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.1 | |
182 | ||
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
185 | %doc doc examples | |
02f0b2ba JB |
186 | %attr(755,root,root) %{_libdir}/libQtSolutions_IOCompressor-%{version}.so |
187 | %{qt4mkspecsdir}/features/qtiocompressor.prf | |
105a26c0 ER |
188 | %{_includedir}/qt4/QtSolutions/QtIOCompressor |
189 | %{_includedir}/qt4/QtSolutions/qtiocompressor.h | |
9156e87a | 190 | %endif |
69077e7e ER |
191 | |
192 | %if %{with qt5} | |
193 | %files -n Qt5IOCompressor | |
194 | %defattr(644,root,root,755) | |
02f0b2ba | 195 | %doc LGPL_EXCEPTION.txt README.TXT |
69077e7e ER |
196 | %attr(755,root,root) %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.*.*.* |
197 | %attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.1 | |
198 | ||
199 | %files -n Qt5IOCompressor-devel | |
200 | %defattr(644,root,root,755) | |
201 | %doc doc examples | |
02f0b2ba JB |
202 | %attr(755,root,root) %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so |
203 | %{qt5mkspecsdir}/features/qtiocompressor.prf | |
69077e7e ER |
204 | %{_includedir}/qt5/QtSolutions/QtIOCompressor |
205 | %{_includedir}/qt5/QtSolutions/qtiocompressor.h | |
206 | %endif |