]>
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} | |
a619a4ab ER |
47 | |
48 | %description devel | |
49 | This package contains libraries and header files for developing | |
50 | applications that use QtIOCompressor. | |
51 | ||
69077e7e ER |
52 | %package -n Qt5IOCompressor |
53 | Summary: QtIOCompressor is a QIODevice that compresses data streams | |
54 | Group: Libraries | |
55 | ||
56 | %description -n Qt5IOCompressor | |
57 | The class works on top of a QIODevice subclass, compressing data | |
58 | before it is written and decompressing it when it is read. | |
59 | ||
60 | Since QtIOCompressor works on streams, it does not have to see the | |
61 | entire data set before compressing or decompressing it. This can | |
62 | reduce the memory requirements when working on large data sets. | |
63 | ||
64 | %package -n Qt5IOCompressor-devel | |
65 | Summary: Development files for Qt5IOCompressor | |
66 | Group: Development/Libraries | |
67 | Requires: Qt5IOCompressor = %{version}-%{release} | |
69077e7e ER |
68 | |
69 | %description -n Qt5IOCompressor-devel | |
70 | This package contains libraries and header files for developing | |
71 | applications that use Qt5IOCompressor. | |
72 | ||
a619a4ab ER |
73 | %prep |
74 | %setup -q -n qtiocompressor-%{version}_1-opensource | |
75 | %patch0 -p1 | |
76 | ||
77 | # skip building examples | |
78 | %{__sed} -i -e '/^SUBDIRS+=examples$/d' *.pro | |
79 | ||
a619a4ab | 80 | touch .licenseAccepted |
69077e7e ER |
81 | |
82 | set -- .??* * | |
83 | install -d build-qt{4,5} | |
84 | cp -al "$@" build-qt4 | |
85 | cp -al "$@" build-qt5 | |
86 | ||
87 | %{__sed} -i -e 's/QtSolutions/Qt5Solutions/' build-qt5/common.pri | |
88 | ||
89 | %build | |
90 | %if %{with qt4} | |
91 | cd build-qt4 | |
a619a4ab | 92 | # Does not use GNU configure |
69077e7e | 93 | ./configure -library |
a619a4ab ER |
94 | qmake-qt4 |
95 | %{__make} | |
69077e7e ER |
96 | cd .. |
97 | %endif | |
98 | ||
99 | %if %{with qt5} | |
100 | cd build-qt5 | |
101 | ./configure -library | |
102 | qmake-qt5 | |
103 | %{__make} | |
104 | cd .. | |
105 | %endif | |
a619a4ab ER |
106 | |
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
69077e7e ER |
110 | %if %{with qt4} |
111 | cd build-qt4 | |
105a26c0 | 112 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features} |
a619a4ab ER |
113 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} |
114 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
105a26c0 ER |
115 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions |
116 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features | |
69077e7e ER |
117 | cd .. |
118 | %endif | |
119 | ||
120 | %if %{with qt5} | |
121 | cd build-qt5 | |
122 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features} | |
123 | cp -a lib/* $RPM_BUILD_ROOT%{_libdir} | |
124 | rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0 | |
125 | cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions | |
126 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt5dir}/mkspecs/features | |
127 | cd .. | |
128 | %endif | |
a619a4ab ER |
129 | |
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %post -p /sbin/ldconfig | |
134 | %postun -p /sbin/ldconfig | |
135 | ||
fa03d4ca ER |
136 | %post -n Qt5IOCompressor -p /sbin/ldconfig |
137 | %postun -n Qt5IOCompressor -p /sbin/ldconfig | |
138 | ||
a619a4ab ER |
139 | %files |
140 | %defattr(644,root,root,755) | |
141 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
142 | %attr(755,root,root) %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.*.*.* | |
143 | %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.1 | |
144 | ||
145 | %files devel | |
146 | %defattr(644,root,root,755) | |
147 | %doc doc examples | |
148 | %{_libdir}/libQtSolutions_IOCompressor-%{version}.so | |
105a26c0 ER |
149 | %{qt4dir}/mkspecs/features/qtiocompressor.prf |
150 | %{_includedir}/qt4/QtSolutions/QtIOCompressor | |
151 | %{_includedir}/qt4/QtSolutions/qtiocompressor.h | |
69077e7e ER |
152 | |
153 | %if %{with qt5} | |
154 | %files -n Qt5IOCompressor | |
155 | %defattr(644,root,root,755) | |
156 | %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT | |
157 | %attr(755,root,root) %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.*.*.* | |
158 | %attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.1 | |
159 | ||
160 | %files -n Qt5IOCompressor-devel | |
161 | %defattr(644,root,root,755) | |
162 | %doc doc examples | |
163 | %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so | |
164 | %{qt5dir}/mkspecs/features/qtiocompressor.prf | |
165 | %{_includedir}/qt5/QtSolutions/QtIOCompressor | |
166 | %{_includedir}/qt5/QtSolutions/qtiocompressor.h | |
167 | %endif |