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