tizen 2.4 release
[external/boost.git] / packaging / boost.spec
1 Name:    boost
2 Summary: The Boost C++ Libraries
3 Version: 1.51.0
4 Release: 6
5 License: BSL-1.0
6 URL:     http://www.boost.org/
7 Group:   System/Libraries
8 Source:  boost-1.51.0.tar.gz
9
10 Obsoletes: boost-doc <= 1.30.2
11 Obsoletes: boost-python <= 1.30.2
12 Provides:  boost-doc = %{version}-%{release}
13
14 # boost is an "umbrella" package that pulls in all other boost components
15 Requires: boost-chrono = %{version}-%{release}
16 Requires: boost-program-options = %{version}-%{release}
17 Requires: boost-thread = %{version}-%{release}
18 Requires: boost-test = %{version}-%{release}
19 Requires: boost-filesystem = %{version}-%{release}
20 Requires: boost-system = %{version}-%{release}
21 Requires: boost-date-time = %{version}-%{release}
22 Requires: boost-regex = %{version}-%{release}
23 Requires: boost-serialization = %{version}-%{release}
24 Requires: boost-iostreams = %{version}-%{release}
25 Requires: boost-random = %{version}-%{release}
26
27 BuildRequires: libstdc++-devel
28 BuildRequires: bzip2-libs
29 BuildRequires: bzip2-devel
30 BuildRequires: zlib-devel
31 BuildRequires: python-devel
32 BuildRequires: libicu-devel
33 BuildRequires: chrpath
34
35 %bcond_with tests
36 %bcond_with docs_generated
37
38 %description
39 Boost provides free peer-reviewed portable C++ source libraries.  The
40 emphasis is on libraries which work well with the C++ Standard
41 Library, in the hopes of establishing "existing practice" for
42 extensions and providing reference implementations so that the Boost
43 libraries are suitable for eventual standardization. (Some of the
44 libraries have already been proposed for inclusion in the C++
45 Standards Committee's upcoming C++ Standard Library Technical Report.)
46
47 %package chrono
48 Summary: Run-Time component of boost chrono library
49 Group: System Environment/Libraries
50 Provides: libboost_chrono.so.%{version}
51
52 %description chrono
53 Run-Time support for Boost.Chrono, a set of useful time utilities.
54
55 %package program-options
56 Summary:  Runtime component of boost program_options library
57 Group: System/Libraries
58 Provides: libboost_program_options.so.%{version}
59
60 %description program-options
61 Runtime support of boost program options library, which allows program
62 developers to obtain (name, value) pairs from the user, via
63 conventional methods such as command line and config file.
64
65 %package thread
66 Summary: Runtime component of boost thread library
67 Group: System/Libraries
68 Provides: libboost_thread.so.%{version}
69
70 %description thread
71 Runtime component Boost.Thread library, which provides classes and
72 functions for managing multiple threads of execution, and for
73 synchronizing data between the threads or providing separate copies of
74 data specific to individual threads.
75
76 %package system
77 Summary:  Runtime component of boost system library
78 Group: System/Libraries
79 Provides: libboost_system.so.%{version}
80
81 %description system
82 Runtime component Boost. System library, which provides simple, light-weight
83 error_code objects that encapsulate system-specific error code values,
84 yet also provide access to more abstract and portable error conditions via
85 error_condition objects.
86
87 %package filesystem
88 Summary:  Runtime component of boost filesystem library
89 Group: System/Libraries
90 Provides: libboost_filesystem.so.%{version}
91
92 %description filesystem
93 Runtime component Boost. FileSystem library, which provides facilities
94 to manipulate files and directories, and the paths that identify them.
95
96 %package date-time
97 Summary:  A set of date-time libraries based on generic programming concepts.
98 Group: System/Libraries
99 Provides: libboost_date_time.so.%{version}
100
101 %description date-time
102 The motivation for this library comes from working with and helping build several date-time libraries on several projects.
103 Date-time libraries provide fundamental infrastructure for most development projects.
104
105 %package regex
106 Summary: Runtime component of boost system library
107 Group: System/Libraries
108 Provides: libboost_regex.so.%{version}
109 Requires: libicu
110
111 %description regex
112 Runtime support for boost regular expression library.
113
114 %package serialization
115 Summary: Runtime component of boost serialization library
116 Group: System/Libraries
117 Provides: libboost_serialization.so.%{version}
118
119 %description serialization
120 Runtime support for serialization for persistence and marshalling.
121
122 %package iostreams
123 Summary: Runtime component of boost IOStreams library
124 Group: System/Libraries
125 Provides: libboost_iostreams.so.%{version}
126
127 %description iostreams
128 Runtime support for boost IOStreams library
129
130 %package random
131 Summary: Runtime component of boost random library
132 Group: System/Libraries
133 Provides: libboost_random.so.%{version}
134
135 %description random
136 Runtime support for boost random library
137
138 %package devel
139 Summary: The Boost C++ headers and shared development libraries
140 Group: Development/Libraries
141 Requires: boost = %{version}-%{release}
142 Provides: boost-devel = %{version}-%{release}
143
144 %description devel
145 Headers and shared object symlinks for the Boost C++ libraries.
146
147 %package static
148 Summary: The Boost C++ static development libraries
149 Group: Development/Libraries
150 Requires: boost-devel = %{version}-%{release}
151 Obsoletes: boost-devel-static < 1.34.1-14
152 Provides: boost-devel-static = %{version}-%{release}
153
154 %description static
155 Static Boost C++ libraries.
156
157 %package test
158 Summary:  Runtime component of boost program_options library
159 Group: System/Libraries
160 Provides: libboost_test.so.%{version}
161
162 %description test
163 Boost Test
164
165 %package doc
166 Summary: The Boost C++ html docs
167 Group: Documentation
168 Provides: boost-python-docs = %{version}-%{release}
169
170 %description doc
171 HTML documentation files for Boost C++ libraries.
172
173 %prep
174 %setup -q
175
176 %build
177 BOOST_ROOT=`pwd`
178 export BOOST_ROOT
179
180 BOOST_LIBS="program_options,thread,system,filesystem,date_time,regex,serialization,iostreams,random,test"
181 REGEX_FLAGS="--with-icu"
182
183 # build make tools, ie bjam, necessary for building libs, docs, and testing
184 #(cd tools/jam/src && ./build.sh)
185 ./bootstrap.sh --with-libraries=$BOOST_LIBS $REGEX_FLAGS --prefix=$RPM_BUILD_ROOT/usr --with-toolset=gcc
186 #BJAM=`find . -name bjam -a -type f`
187 #./b2
188
189 %install
190 rm -rf $RPM_BUILD_ROOT
191 mkdir -p $RPM_BUILD_ROOT/usr
192 mkdir -p $RPM_BUILD_ROOT%{_libdir}
193 mkdir -p $RPM_BUILD_ROOT%{_includedir}
194 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
195
196 mkdir -p %{buildroot}/%{_datadir}/license
197 cp -rf %{_builddir}/%{name}-%{version}/packaging/%{name} %{buildroot}/%{_datadir}/license
198
199 # LICENSE
200 mkdir -p %{buildroot}/usr/share/license
201 cp -af packaging/boost %{buildroot}/usr/share/license/%{name}
202
203 ./b2 install
204
205 # install lib
206 #for i in `find stage -type f -name \*.a`; do
207 #  NAME=`basename $i`;
208 #  install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME;
209 #done;
210 #for i in `find stage \( -type f -o -type l \) -name \*.so*`; do
211 #  NAME=`basename $i`;
212 #  install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME;
213 #  strip $RPM_BUILD_ROOT%{_libdir}/$NAME;
214 #done;
215
216 # install include files
217 #find %{name} -type d | while read a; do
218 #  mkdir -p $RPM_BUILD_ROOT%{_includedir}/$a
219 #  find $a -mindepth 1 -maxdepth 1 -type f \
220 #  | xargs -r install -m 644 -p -t $RPM_BUILD_ROOT%{_includedir}/$a
221 #done
222
223 # install doc files
224 DOCPATH=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
225 find libs doc more -type f \( -name \*.htm -o -name \*.html \) \
226     | sed -n '/\//{s,/[^/]*$,,;p}' \
227     | sort -u > tmp-doc-directories
228 sed "s:^:$DOCPATH:" tmp-doc-directories | xargs -r mkdir -p
229 cat tmp-doc-directories | while read a; do
230     find $a -mindepth 1 -maxdepth 1 -name \*.htm\* \
231     | xargs install -m 644 -p -t $DOCPATH$a
232 done
233 rm tmp-doc-directories
234 install -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm
235
236 # install pkgconfig file
237 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
238 install -D -m 644 packaging/boost.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig
239
240 # remove scripts used to generate include files
241 find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec rm {} \;
242
243 %clean
244 rm -rf $RPM_BUILD_ROOT
245
246 %post -p /sbin/ldconfig
247 %postun -p /sbin/ldconfig
248
249 %post chrono -p /sbin/ldconfig
250 %postun chrono -p /sbin/ldconfig
251
252 %post program-options -p /sbin/ldconfig
253 %postun program-options -p /sbin/ldconfig
254
255 %post thread -p /sbin/ldconfig
256 %postun thread -p /sbin/ldconfig
257
258 %post system -p /sbin/ldconfig
259 %postun system -p /sbin/ldconfig
260
261 %post filesystem -p /sbin/ldconfig
262 %postun filesystem -p /sbin/ldconfig
263
264 %post date-time -p /sbin/ldconfig
265 %postun date-time -p /sbin/ldconfig
266
267 %post regex -p /sbin/ldconfig
268 %postun regex -p /sbin/ldconfig
269
270 %post serialization -p /sbin/ldconfig
271 %postun serialization -p /sbin/ldconfig
272
273 %post iostreams -p /sbin/ldconfig
274 %postun iostreams -p /sbin/ldconfig
275
276 %post random -p /sbin/ldconfig
277 %postun random -p /sbin/ldconfig
278
279 %post doc -p /sbin/ldconfig
280 %postun doc -p /sbin/ldconfig
281
282 %post devel -p /sbin/ldconfig
283 %postun devel -p /sbin/ldconfig
284
285 %post static -p /sbin/ldconfig
286 %postun static -p /sbin/ldconfig
287
288 %post test -p /sbin/ldconfig
289 %postun test -p /sbin/ldconfig
290
291 %files
292 %manifest boost.manifest
293 %{_datadir}/license/%{name}
294
295 %files chrono
296 %manifest boost.manifest
297 %defattr(-, root, root, -)
298 %{_libdir}/libboost_chrono*.so.%{version}
299
300 %files program-options
301 %manifest boost.manifest
302 %defattr(-, root, root, -)
303 %{_libdir}/libboost_program_options*.so.%{version}
304
305 %files thread
306 %manifest boost.manifest
307 %defattr(-, root, root, -)
308 %{_libdir}/libboost_thread*.so.%{version}
309
310 %files system
311 %manifest boost.manifest
312 %defattr(-, root, root, -)
313 %{_libdir}/libboost_system*.so.%{version}
314
315 %files filesystem
316 %manifest boost.manifest
317 %defattr(-, root, root, -)
318 %{_libdir}/libboost_filesystem*.so.%{version}
319
320 %files date-time
321 %manifest boost.manifest
322 %defattr(-, root, root, -)
323 %{_libdir}/libboost_date_time*.so.%{version}
324
325 %files regex
326 %manifest boost.manifest
327 %defattr(-, root, root, -)
328 %{_libdir}/libboost_regex*.so.%{version}
329
330 %files serialization
331 %manifest boost.manifest
332 %defattr(-, root, root, -)
333 %{_libdir}/libboost_serialization*.so.%{version}
334 %{_libdir}/libboost_wserialization*.so.%{version}
335
336 %files iostreams
337 %manifest boost.manifest
338 %defattr(-, root, root, -)
339 %{_libdir}/libboost_iostreams*.so.%{version}
340
341 %files random
342 %manifest boost.manifest
343 %defattr(-, root, root, -)
344 %{_libdir}/libboost_random*.so.%{version}
345
346 %files doc
347 %manifest boost.manifest
348 %defattr(-, root, root, -)
349 %doc %{_docdir}/%{name}-%{version}
350
351 %files devel
352 %defattr(-, root, root, -)
353 %{_includedir}/boost
354 %{_libdir}/*.so
355 %{_libdir}/pkgconfig/boost.pc
356
357 %files static
358 %manifest boost.manifest
359 %defattr(-, root, root, -)
360 %{_libdir}/*.a
361
362 %files test
363 %manifest boost.manifest
364 %defattr(-, root, root, -)
365 %{_libdir}/libboost_unit_test_framework*.so.%{version}
366 %{_libdir}/libboost_prg_exec_monitor*.so.%{version}