]> git.pld-linux.org Git - packages/QtIOCompressor.git/blame_incremental - QtIOCompressor.spec
ldconfig
[packages/QtIOCompressor.git] / QtIOCompressor.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without qt4 # build Qt4
4%bcond_without qt5 # build Qt5
5
6Summary: QtIOCompressor is a QIODevice that compresses data streams
7Name: QtIOCompressor
8Version: 2.3
9Release: 2
10License: GPL v3 or LGPL v2 with exceptions
11Group: Libraries
12Source0: http://get.qt.nokia.com/qt/solutions/lgpl/qtiocompressor-%{version}_1-opensource.tar.gz
13# Source0-md5: 73bbde56cf705602b4f180b379756a40
14Source1: qtiocompressor.prf
15Patch0: libs.patch
16URL: http://doc.qt.digia.com/solutions/4/qtiocompressor/qtiocompressor.html
17BuildRequires: sed >= 4.0
18%if %{with qt4}
19BuildRequires: QtCore-devel
20BuildRequires: QtGui-devel
21BuildRequires: qt4-build
22BuildRequires: qt4-qmake
23%endif
24%if %{with qt5}
25BuildRequires: Qt5Core-devel
26BuildRequires: Qt5Gui-devel
27BuildRequires: qt5-build
28BuildRequires: qt5-qmake
29%endif
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%define qt4dir %{_datadir}/qt4
33%define qt5dir %{_libdir}/qt5
34
35%description
36The class works on top of a QIODevice subclass, compressing data
37before it is written and decompressing it when it is read.
38
39Since QtIOCompressor works on streams, it does not have to see the
40entire data set before compressing or decompressing it. This can
41reduce the memory requirements when working on large data sets.
42
43%package devel
44Summary: Development files for QtIOCompressor
45Group: Development/Libraries
46Requires: %{name} = %{version}-%{release}
47
48%description devel
49This package contains libraries and header files for developing
50applications that use QtIOCompressor.
51
52%package -n Qt5IOCompressor
53Summary: QtIOCompressor is a QIODevice that compresses data streams
54Group: Libraries
55
56%description -n Qt5IOCompressor
57The class works on top of a QIODevice subclass, compressing data
58before it is written and decompressing it when it is read.
59
60Since QtIOCompressor works on streams, it does not have to see the
61entire data set before compressing or decompressing it. This can
62reduce the memory requirements when working on large data sets.
63
64%package -n Qt5IOCompressor-devel
65Summary: Development files for Qt5IOCompressor
66Group: Development/Libraries
67Requires: Qt5IOCompressor = %{version}-%{release}
68
69%description -n Qt5IOCompressor-devel
70This package contains libraries and header files for developing
71applications 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
80touch .licenseAccepted
81
82set -- .??* *
83install -d build-qt{4,5}
84cp -al "$@" build-qt4
85cp -al "$@" build-qt5
86
87%{__sed} -i -e 's/QtSolutions/Qt5Solutions/' build-qt5/common.pri
88
89%build
90%if %{with qt4}
91cd build-qt4
92# Does not use GNU configure
93./configure -library
94qmake-qt4
95%{__make}
96cd ..
97%endif
98
99%if %{with qt5}
100cd build-qt5
101./configure -library
102qmake-qt5
103%{__make}
104cd ..
105%endif
106
107%install
108rm -rf $RPM_BUILD_ROOT
109
110%if %{with qt4}
111cd build-qt4
112install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt4/QtSolutions,%{qt4dir}/mkspecs/features}
113cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
114rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0
115cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt4/QtSolutions
116cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt4dir}/mkspecs/features
117cd ..
118%endif
119
120%if %{with qt5}
121cd build-qt5
122install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/qt5/QtSolutions,%{qt5dir}/mkspecs/features}
123cp -a lib/* $RPM_BUILD_ROOT%{_libdir}
124rm $RPM_BUILD_ROOT%{_libdir}/lib*.so.1.0
125cp -p src/qtiocompressor.h src/QtIOCompressor $RPM_BUILD_ROOT%{_includedir}/qt5/QtSolutions
126cp -p %{SOURCE1} $RPM_BUILD_ROOT%{qt5dir}/mkspecs/features
127cd ..
128%endif
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%post -p /sbin/ldconfig
134%postun -p /sbin/ldconfig
135
136%post -n Qt5IOCompressor -p /sbin/ldconfig
137%postun -n Qt5IOCompressor -p /sbin/ldconfig
138
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
149%{qt4dir}/mkspecs/features/qtiocompressor.prf
150%{_includedir}/qt4/QtSolutions/QtIOCompressor
151%{_includedir}/qt4/QtSolutions/qtiocompressor.h
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
This page took 0.598048 seconds and 4 git commands to generate.