]>
Commit | Line | Data |
---|---|---|
69077e7e ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qt4 # build Qt4 | |
4 | %bcond_without qt5 # build Qt5 | |
5 | ||
a619a4ab ER |
6 | Summary: QtIOCompressor is a QIODevice that compresses data streams |
7 | Name: QtIOCompressor | |
8 | Version: 2.3 | |
69077e7e | 9 | Release: 2 |
a619a4ab ER |
10 | License: GPL v3 or LGPL v2 with exceptions |
11 | Group: Libraries | |
a619a4ab ER |
12 | Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtiocompressor-%{version}_1-opensource.tar.gz |
13 | # Source0-md5: 73bbde56cf705602b4f180b379756a40 | |
14 | Source1: qtiocompressor.prf | |
15 | Patch0: libs.patch | |
105a26c0 | 16 | URL: http://doc.qt.digia.com/solutions/4/qtiocompressor/qtiocompressor.html |
69077e7e ER |
17 | BuildRequires: sed >= 4.0 |
18 | %if %{with qt4} | |
a619a4ab ER |
19 | BuildRequires: QtCore-devel |
20 | BuildRequires: QtGui-devel | |
21 | BuildRequires: qt4-build | |
22 | BuildRequires: qt4-qmake | |
69077e7e ER |
23 | %endif |
24 | %if %{with qt5} | |
25 | BuildRequires: Qt5Core-devel | |
26 | BuildRequires: Qt5Gui-devel | |
27 | BuildRequires: qt5-build | |
28 | BuildRequires: qt5-qmake | |
29 | %endif | |
a619a4ab ER |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
105a26c0 | 32 | %define qt4dir %{_datadir}/qt4 |
69077e7e | 33 | %define qt5dir %{_libdir}/qt5 |
a619a4ab ER |
34 | |
35 | %description | |
36 | The class works on top of a QIODevice subclass, compressing data | |
37 | before it is written and decompressing it when it is read. | |
38 | ||
39 | Since QtIOCompressor works on streams, it does not have to see the | |
40 | entire data set before compressing or decompressing it. This can | |
41 | reduce the memory requirements when working on large data sets. | |
42 | ||
43 | %package devel | |
44 | Summary: Development files for QtIOCompressor | |
45 | Group: Development/Libraries | |
46 | Requires: %{name} = %{version}-%{release} | |
47 | Requires: qt4-build | |
48 | Requires: qt4-qmake | |
49 | ||
50 | %description devel | |
51 | This package contains libraries and header files for developing | |
52 | applications that use QtIOCompressor. | |
53 | ||
69077e7e ER |
54 | %package -n Qt5IOCompressor |
55 | Summary: QtIOCompressor is a QIODevice that compresses data streams | |
56 | Group: Libraries | |
57 | ||
58 | %description -n Qt5IOCompressor | |
59 | The class works on top of a QIODevice subclass, compressing data | |
60 | before it is written and decompressing it when it is read. | |
61 | ||
62 | Since QtIOCompressor works on streams, it does not have to see the | |
63 | entire data set before compressing or decompressing it. This can | |
64 | reduce the memory requirements when working on large data sets. | |
65 | ||
66 | %package -n Qt5IOCompressor-devel | |
67 | Summary: Development files for Qt5IOCompressor | |
68 | Group: Development/Libraries | |
69 | Requires: Qt5IOCompressor = %{version}-%{release} | |
70 | Requires: qt5-build | |
71 | Requires: qt5-qmake | |
72 | ||
73 | %description -n Qt5IOCompressor-devel | |
74 | This package contains libraries and header files for developing | |
75 | applications that use Qt5IOCompressor. | |
76 | ||
a619a4ab ER |
77 | %prep |
78 | %setup -q -n qtiocompressor-%{version}_1-opensource | |
79 | %patch0 -p1 | |
80 | ||
81 | # skip building examples | |
82 | %{__sed} -i -e '/^SUBDIRS+=examples$/d' *.pro | |
83 | ||
a619a4ab | 84 | touch .licenseAccepted |
69077e7e ER |
85 | |
86 | set -- .??* * | |
87 | install -d build-qt{4,5} | |
88 | cp -al "$@" build-qt4 | |
89 | cp -al "$@" build-qt5 | |
90 | ||
91 | %{__sed} -i -e 's/QtSolutions/Qt5Solutions/' build-qt5/common.pri | |
92 | ||
93 | %build | |
94 | %if %{with qt4} | |
95 | cd build-qt4 | |
a619a4ab | 96 | # Does not use GNU configure |
69077e7e | 97 | ./configure -library |
a619a4ab ER |
98 | qmake-qt4 |
99 | %{__make} | |
69077e7e ER |
100 | cd .. |
101 | %endif | |
102 | ||
103 | %if %{with qt5} | |
104 | cd build-qt5 | |
105 | ./configure -library | |
106 | qmake-qt5 | |
107 | %{__make} | |
108 | cd .. | |
109 | %endif | |
a619a4ab ER |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
69077e7e ER |
114 | %if %{with qt4} |
115 | cd build-qt4 | |
105a26c0 | 116 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features} |
a619a4ab ER |
117 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} |
118 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
105a26c0 ER |
119 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions |
120 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features | |
69077e7e ER |
121 | cd .. |
122 | %endif | |
123 | ||
124 | %if %{with qt5} | |
125 | cd build-qt5 | |
126 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features} | |
127 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} | |
128 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
129 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions | |
130 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt5dir}/mkspecs/features | |
131 | cd .. | |
132 | %endif | |
a619a4ab ER |
133 | |
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %post -p /sbin/ldconfig | |
138 | %postun -p /sbin/ldconfig | |
139 | ||
140 | %files | |
141 | %defattr(644,root,root,755) | |
142 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
143 | %attr(755,root,root) %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.*.*.* | |
144 | %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.1 | |
145 | ||
146 | %files devel | |
147 | %defattr(644,root,root,755) | |
148 | %doc doc examples | |
149 | %{_libdir}/libQtSolutions_IOCompressor-%{version}.so | |
105a26c0 ER |
150 | %{qt4dir}/mkspecs/features/qtiocompressor.prf |
151 | %{_includedir}/qt4/QtSolutions/QtIOCompressor | |
152 | %{_includedir}/qt4/QtSolutions/qtiocompressor.h | |
69077e7e ER |
153 | |
154 | %if %{with qt5} | |
155 | %files -n Qt5IOCompressor | |
156 | %defattr(644,root,root,755) | |
157 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
158 | %attr(755,root,root) %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.*.*.* | |
159 | %attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.1 | |
160 | ||
161 | %files -n Qt5IOCompressor-devel | |
162 | %defattr(644,root,root,755) | |
163 | %doc doc examples | |
164 | %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so | |
165 | %{qt5dir}/mkspecs/features/qtiocompressor.prf | |
166 | %{_includedir}/qt5/QtSolutions/QtIOCompressor | |
167 | %{_includedir}/qt5/QtSolutions/qtiocompressor.h | |
168 | %endif |