]> git.pld-linux.org Git - packages/QtIOCompressor.git/blob - QtIOCompressor.spec
drop qt*-build, and qt*-qmake from -devel deps
[packages/QtIOCompressor.git] / QtIOCompressor.spec
1 #
2 # Conditional build:
3 %bcond_without  qt4             # build Qt4
4 %bcond_without  qt5             # build Qt5
5
6 Summary:        QtIOCompressor is a QIODevice that compresses data streams
7 Name:           QtIOCompressor
8 Version:        2.3
9 Release:        2
10 License:        GPL v3 or LGPL v2 with exceptions
11 Group:          Libraries
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
16 URL:            http://doc.qt.digia.com/solutions/4/qtiocompressor/qtiocompressor.html
17 BuildRequires:  sed >= 4.0
18 %if %{with qt4}
19 BuildRequires:  QtCore-devel
20 BuildRequires:  QtGui-devel
21 BuildRequires:  qt4-build
22 BuildRequires:  qt4-qmake
23 %endif
24 %if %{with qt5}
25 BuildRequires:  Qt5Core-devel
26 BuildRequires:  Qt5Gui-devel
27 BuildRequires:  qt5-build
28 BuildRequires:  qt5-qmake
29 %endif
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         qt4dir  %{_datadir}/qt4
33 %define         qt5dir  %{_libdir}/qt5
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
48 %description devel
49 This package contains libraries and header files for developing
50 applications that use QtIOCompressor.
51
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}
68
69 %description -n Qt5IOCompressor-devel
70 This package contains libraries and header files for developing
71 applications that use Qt5IOCompressor.
72
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
80 touch .licenseAccepted
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
92 # Does not use GNU configure
93 ./configure -library
94 qmake-qt4
95 %{__make}
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
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %if %{with qt4}
111 cd build-qt4
112 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features}
113 cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
114 rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0
115 cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions
116 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features
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
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   -p /sbin/ldconfig
134 %postun -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT
139 %attr(755,root,root) %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.*.*.*
140 %attr(755,root,root) %ghost %{_libdir}/libQtSolutions_IOCompressor-%{version}.so.1
141
142 %files devel
143 %defattr(644,root,root,755)
144 %doc doc examples
145 %{_libdir}/libQtSolutions_IOCompressor-%{version}.so
146 %{qt4dir}/mkspecs/features/qtiocompressor.prf
147 %{_includedir}/qt4/QtSolutions/QtIOCompressor
148 %{_includedir}/qt4/QtSolutions/qtiocompressor.h
149
150 %if %{with qt5}
151 %files -n Qt5IOCompressor
152 %defattr(644,root,root,755)
153 %doc LGPL_EXCEPTION.txt LICENSE.* README.TXT
154 %attr(755,root,root) %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so.1
156
157 %files -n Qt5IOCompressor-devel
158 %defattr(644,root,root,755)
159 %doc doc examples
160 %{_libdir}/libQt5Solutions_IOCompressor-%{version}.so
161 %{qt5dir}/mkspecs/features/qtiocompressor.prf
162 %{_includedir}/qt5/QtSolutions/QtIOCompressor
163 %{_includedir}/qt5/QtSolutions/qtiocompressor.h
164 %endif
This page took 0.160287 seconds and 3 git commands to generate.