set TMPDIR - also removed a quote in comment that confuses emacs
[boost.git] / boost.spec
1 %bcond_with tests
2 %define sonamever 4
3
4 %define version 1.37.0
5 %define taglevel 6
6
7 Name: boost
8 Summary: The Boost C++ Libraries
9 Version: %{version}
10 Release: %{taglevel}
11 License: Boost
12 URL: http://www.boost.org/
13 Group: System Environment/Libraries
14 Source: boost_1_37_0.tar.bz2
15 Obsoletes: boost-doc <= 1.30.2
16 Obsoletes: boost-python <= 1.30.2
17 Provides: boost-python = %{version}-%{release}
18 Provides: boost-doc = %{version}-%{release}
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 BuildRequires: libstdc++-devel
21 BuildRequires: bzip2-libs
22 BuildRequires: bzip2-devel
23 BuildRequires: zlib-devel
24 BuildRequires: python-devel
25 BuildRequires: libicu-devel
26 BuildRequires: chrpath
27 Patch0: boost-configure.patch
28 Patch1: boost-use-rpm-optflags.patch
29 Patch2: boost-run-tests.patch
30 Patch3: boost-gcc43.patch
31 Patch4: boost-gcc-soname.patch
32 Patch5: boost-function_template.patch
33 Patch6: boost-unneccessary_iostreams.patch
34 Patch7: boost-1_37_0-smp.patch
35 Patch8: boost-bitset.patch
36
37 %description
38 Boost provides free peer-reviewed portable C++ source libraries.  The
39 emphasis is on libraries which work well with the C++ Standard
40 Library, in the hopes of establishing "existing practice" for
41 extensions and providing reference implementations so that the Boost
42 libraries are suitable for eventual standardization. (Some of the
43 libraries have already been proposed for inclusion in the C++
44 Standards Committee upcoming C++ Standard Library Technical Report.)
45
46 %package devel
47 Summary: The Boost C++ headers and shared development libraries
48 Group: Development/Libraries
49 Requires: boost = %{version}-%{release}
50 Provides: boost-python-devel = %{version}-%{release}
51
52 %description devel
53 Headers and shared object symlinks for the Boost C++ libraries.
54
55 %package static
56 Summary: The Boost C++ static development libraries
57 Group: Development/Libraries
58 Requires: boost-devel = %{version}-%{release}
59 Obsoletes: boost-devel-static < 1.34.1-14
60 Provides: boost-devel-static = %{version}-%{release}
61
62 %description static
63 Static Boost C++ libraries.
64
65 %package doc
66 Summary: The Boost C++ html docs
67 Group: Documentation
68 Provides: boost-python-docs = %{version}-%{release}
69
70 %description doc
71 HTML documentation files for Boost C++ libraries.
72
73 %prep
74 %setup -q -n %{name}_1_37_0
75 %patch0 -p0
76 %patch1 -p0
77 %patch2 -p0
78 %patch3 -p1
79 sed 's/!!!SONAME!!!/%{sonamever}/' %{PATCH4} | %{__patch} -p1 --fuzz=0
80 %patch5 -p0
81 %patch6 -p0
82 sed 's/!!!SMP_FLAGS!!!/%{?_smp_mflags}/' %{PATCH7} | %{__patch} -p1 --fuzz=0
83 %patch8 -p1
84
85 %build
86 export TMPDIR=/tmp
87 BOOST_ROOT=`pwd`
88 staged_dir=stage
89 export BOOST_ROOT
90
91 # build make tools, ie bjam, necessary for building libs, docs, and testing
92 (cd tools/jam/src && ./build.sh)
93 BJAM=`find tools/jam/src/ -name bjam -a -type f`
94
95 BUILD_FLAGS="--with-toolset=gcc"
96 PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
97 PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
98 REGEX_FLAGS="--with-icu"
99 ./configure $BUILD_FLAGS $PYTHON_FLAGS $REGEX_FLAGS 
100 make all
101
102 # build docs, requires a network connection for docbook XSLT stylesheets
103 #cd ./doc
104 #chmod +x ../tools/boostbook/setup_boostbook.sh
105 #../tools/boostbook/setup_boostbook.sh
106 #$BOOST_ROOT/$BJAM --v2 -sICU_PATH=/usr --user-config=../user-config.jam html
107 #cd ..
108
109 %check
110 %if %{with tests}
111 echo "<p>" `uname -a` "</p>" > status/regression_comment.html
112 echo "" >> status/regression_comment.html
113 echo "<p>" `g++ --version` "</p>" >> status/regression_comment.html
114 echo "" >> status/regression_comment.html
115
116 chmod +x tools/regression/run_tests.sh
117 ./tools/regression/run_tests.sh
118
119 results1=status/cs-`uname`.html
120 results2=status/cs-`uname`-links.html
121 email=benjamin.kosnik@gmail.com
122 if [ -f $results1 ] && [ -f $results2 ]; then
123   echo "sending results starting"
124   testdate=`date +%Y%m%d`
125   testarch=`uname -m`
126   results=boost-results-$testdate-$testarch.tar.bz2
127   tar -cvf boost-results-$testdate-$testarch.tar $results1 $results2
128   bzip2 -f boost-results-$testdate-$testarch.tar 
129   echo | mutt -s "$testdate boost regression $testarch" -a $results $email 
130   echo "sending results finished"
131 else
132   echo "error sending results"
133 fi
134 %endif
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 mkdir -p $RPM_BUILD_ROOT%{_libdir}
139 mkdir -p $RPM_BUILD_ROOT%{_includedir}
140 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
141
142 # install lib
143 for i in `find stage -type f -name \*.a`; do
144   NAME=`basename $i`;
145   install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME;
146 done;
147 for i in `find stage -type f -name \*.so`; do
148   NAME=$i;
149   SONAME=$i.%{sonamever};
150   VNAME=$i.%{version};
151   base=`basename $i`;
152   NAMEbase=$base;
153   SONAMEbase=$base.%{sonamever};
154   VNAMEbase=$base.%{version};
155   mv $i $VNAME;
156
157   # remove rpath
158   chrpath --delete $VNAME;
159
160   ln -s $VNAMEbase $SONAME;
161   ln -s $VNAMEbase $NAME;
162   install -p -m 755 $VNAME $RPM_BUILD_ROOT%{_libdir}/$VNAMEbase; 
163
164   mv $SONAME $RPM_BUILD_ROOT%{_libdir}/$SONAMEbase;
165   mv $NAME $RPM_BUILD_ROOT%{_libdir}/$NAMEbase;
166 done;
167
168 # install include files
169 find %{name} -type d | while read a; do
170   mkdir -p $RPM_BUILD_ROOT%{_includedir}/$a
171   find $a -mindepth 1 -maxdepth 1 -type f \
172   | xargs -r install -m 644 -p -t $RPM_BUILD_ROOT%{_includedir}/$a
173 done
174
175 # install doc files
176 DOCPATH=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
177 find libs doc more -type f \( -name \*.htm -o -name \*.html \) \
178     | sed -n '/\//{s,/[^/]*$,,;p}' \
179     | sort -u > tmp-doc-directories
180 sed "s:^:$DOCPATH:" tmp-doc-directories | xargs -r mkdir -p
181 cat tmp-doc-directories | while read a; do
182     find $a -mindepth 1 -maxdepth 1 -name \*.htm\* \
183     | xargs install -m 644 -p -t $DOCPATH$a
184 done
185 rm tmp-doc-directories
186 install -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm
187
188 # remove scripts used to generate include files
189 find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec rm {} \;
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post -p /sbin/ldconfig
195
196 %postun -p /sbin/ldconfig
197
198 %files
199 %defattr(-, root, root, -)
200 %{_libdir}/*.so.%{version}
201 %{_libdir}/*.so.%{sonamever}
202
203 %files devel
204 %defattr(-, root, root, -)
205 %{_includedir}/boost
206 %{_libdir}/*.so
207
208 %files static
209 %defattr(-, root, root, -)
210 %{_libdir}/*.a
211
212 %files doc
213 %defattr(-, root, root, -)
214 %doc %{_docdir}/%{name}-%{version}
215
216 %changelog
217 * Mon Mar 23 2009 Petr Machata <pmachata@redhat.com> - 1.37.0-6
218 - Apply a SMP patch from Stefan Ring
219 - Apply a workaround for "cannot appear in a constant-expression" in
220   dynamic_bitset library.
221 - Resolves: #491537
222
223 * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.37.0-4
224 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
225
226 * Mon Jan 12 2009 Petr Machata <pmachata@redhat.com> - 1.37.0-3
227 - Apply a unneccessary_iostreams patch from Caolan McNamara
228 - Fix soname patch so that it applies with fuzz=0.  Use fuzz=0 option
229   in spec file just like ordinary patches do.
230 - Resolves: #479409
231
232 * Fri Dec 19 2008 Petr Machata <pmachata@redhat.com> - 1.37.0-2
233 - Apply a function_template patch from Caolan McNamara
234 - Resolves: #477131
235
236 * Tue Dec 16 2008 Benjamin Kosnik <bkoz@redhat.com> - 1.37.0-1
237 - Fix rpmlint rpath errors.
238 - Fix rpmlint warnings on tabs and spaces.
239 - Bump SONAME to 4
240
241 * Tue Nov 17 2008 Benjamin Kosnik <bkoz@redhat.com> - 1.37.0-0.1
242 - Rebase to 1.37.0.
243
244 * Tue Oct 21 2008 Benjamin Kosnik <bkoz@redhat.com> - 1.36.0-1
245 - Rebase to 1.36.0.
246
247 * Mon Oct  6 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-17
248 - Fix gcc43 patch to apply cleanly under --fuzz=0
249 - Resolves: #465003
250
251 * Mon Aug 11 2008 Petr Machata <pmachata@redhat.com> - 1.36.0-0.1.beta1
252 - Rebase to 1.36.0.beta1
253   - Drop boost-regex.patch and portions of boost-gcc43.patch, port the rest
254   - Automate SONAME tracking and bump SONAME to 4
255   - Adjust boost-configure.patch to include threading=single,multi explicitly
256
257 * Thu Jun 12 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-16
258 - Fix "changes meaning of keywords" in boost date_time
259 - Related: #450718
260
261 * Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.34.1-15
262 - fix license tag
263
264 * Thu Mar 27 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-14
265 - Change devel-static back to static.
266 - Related: #225622
267
268 * Wed Mar 26 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-13
269 - Install library doc files
270 - Revamp %%install phase to speed up overall build time
271 - Some cleanups per merge review
272 - Resolves: #437032
273
274 * Thu Feb 14 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-12
275 - Fix "changes meaning of keywords" in boost python
276 - Resolves: #432694
277
278 * Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-11
279 - Fix "changes meaning of special_values_parser" in boost date_time
280 - Resolves: #432433
281
282 * Wed Feb  6 2008 Petr Machata <pmachata@redhat.com> - 1.34.1-10
283 - Fixes for GCC 4.3
284 - Resolves: #431609
285
286 * Mon Jan 14 2008 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-7
287 - Fixes for boost.regex (rev 42674).
288
289 * Wed Sep 19 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-5
290 - (#283771: Linking against boost libraries fails).
291
292 * Tue Aug 21 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-4
293 - Rebuild.
294
295 * Wed Aug 08 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-3
296 - Rebuild for icu 3.8 bump.
297
298 * Thu Aug 02 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-2
299 - SONAME to 3.
300
301 * Tue Jul 31 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1-1
302 - Update to boost_1_34_1.
303 - Source via http.
304 - Philipp Thomas <pth.suse.de> fix for RPM_OPT_FLAGS
305 - Philipp Thomas <pth.suse.de> fix for .so sym links.
306 - (#225622) Patrice Dumas review comments. 
307
308 * Tue Jun 26 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.1.rc1-0.1
309 - Update to boost_1_34_1_RC1.
310
311 * Mon Apr 02 2007 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-13
312 - (#225622: Merge Review: boost)
313   Change static to devel-static.
314
315 * Mon Mar 26 2007 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-12
316 - (#233523: libboost_python needs rebuild against python 2.5)
317   Use patch.
318
319 * Mon Mar 26 2007 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-11
320 - (#225622: Merge Review: boost)
321   Source to http.
322   BuildRoot to preferred value.
323   PreReq to post/postun -p
324   Clarified BSL as GPL-Compatible, Free Software License.
325   Remove Obsoletes.
326   Add Provides boost-python.
327   Remove mkdir -p $RPM_BUILD_ROOT%%{_docdir}
328   Added periods for decription text. 
329   Fix Group field.
330   Remove doc Requires boost.
331   Preserve timestamps on install.
332   Use %%defattr(-, root, root, -)
333   Added static package for .a libs.
334   Install static libs with 0644 permissions.
335   Use %%doc for doc files.
336
337 * Mon Jan 22 2007 Benjamin Kosnik <bkoz@redhat.com> 1.34.0-0.5
338 - Update to boost.RC_1_34_0 snapshot as of 2007-01-19.
339 - Modify build procedures for boost build v2.
340 - Add *-mt variants for libraries, or at least variants that use
341   threads (regex and thread).
342
343 * Thu Nov 23 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-10
344 - (#182414: boost: put tests in %%check section) via Rex Dieter
345 - Fix EVR with %%{?dist} tag via Gianluca Sforna
346
347 * Wed Nov 15 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-9
348 - (#154784: boost-debuginfo package is empty)
349
350 * Tue Nov 14 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-8
351 - (#205866: Revert scanner.hpp change.)
352
353 * Mon Nov 13 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-7
354 - (#205866: boost::spirit generates warnings with -Wshadow)
355 - (#205863: serialization lib generates warnings)
356 - (#204326: boost RPM missing dependencies)
357 - (#193465: [SIGNAL/BIND] Regressions with GCC 4.1)
358 - BUILD_FLAGS, add, to see actual compile line.
359 - REGEX_FLAGS, add, to compile regex with ICU support.
360
361 * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.33.1-6.1
362 - rebuild
363
364 * Tue May 16 2006 Karsten Hopp <karsten@redhat.de> 1.33.1-6
365 - buildrequire python-devel for Python.h
366
367 * Thu Feb 16 2006 Florian La Roche <laroche@redhat.com> - 1.33.1-5
368 - use the real version number to point to the shared libs
369
370 * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.33.1-4.2
371 - bump again for double-long bug on ppc(64)
372
373 * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.33.1-4.1
374 - rebuilt for new gcc4.1 snapshot and glibc changes
375
376 * Thu Jan 05 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-4
377 - Fix symbolic links.
378
379 * Wed Jan 04 2006 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-3
380 - Update to boost-1.33.1.
381 - (#176485: Missing BuildRequires)
382 - (#169271: /usr/lib/libboost*.so.? links missing in package)
383
384 * Thu Dec 22 2005 Jesse Keating <jkeating@redhat.com> 1.33.1-2
385 - rebuilt
386
387 * Mon Nov 14 2005 Benjamin Kosnik <bkoz@redhat.com> 1.33.1-1
388 - Update to boost-1.33.1 beta.
389 - Run testsuite, gather results.
390
391 * Tue Oct 11 2005 Nils Philippsen <nphilipp@redhat.com> 1.33.0-4
392 - build require bzip2-devel and zlib-devel
393
394 * Tue Aug 23 2005 Benjamin Kosnik <bkoz@redhat.com> 1.33.0-3
395 - Create doc package again.
396 - Parts of the above by Neal Becker <ndbecker2@gmail.com>.
397
398 * Fri Aug 12 2005 Benjamin Kosnik <bkoz@redhat.com> 1.33.0-1
399 - Update to boost-1.33.0, update SONAME to 2 due to ABI changes.
400 - Simplified PYTHON_VERSION by Philipp Thomas <pth@suse.de>
401
402 * Tue May 24 2005 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-6
403 - (#153093: boost warns that gcc 4.0.0 is an unknown compiler)
404 - (#152205: development .so symlinks should be in -devel subpackage)
405 - (#154783: linker .so symlinks missing from boost-devel package)
406
407 * Fri Mar 18 2005 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-5
408 - Revert boost-base.patch to old behavior.
409 - Use SONAMEVERSION instead of dllversion.
410
411 * Wed Mar 16 2005 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-4
412 - (#142612: Compiling Boost 1.32.0 Failed in RHEL 3.0 on Itanium2) 
413 - (#150069: libboost_python.so is missing)
414 - (#141617: bad patch boost-base.patch)
415 - (#122817: libboost_*.so symlinks missing)
416 - Re-add boost-thread.patch.
417 - Change boost-base.patch to show thread tags.
418 - Change boost-gcc-tools.patch to use SOTAG, compile with dllversion.
419 - Add symbolic links to files.
420 - Sanity check can compile with gcc-3.3.x, gcc-3.4.2, gcc-4.0.x., gcc-4.1.x.
421
422 * Thu Dec 02 2004 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-3
423 - (#122817: libboost_*.so symlinks missing)
424 - (#141574: half of the package is missing)
425 - (#141617: bad patch boost-base.patch)
426
427 * Wed Dec 01 2004 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-2
428 - Remove bogus Obsoletes.
429
430 * Mon Nov 29 2004 Benjamin Kosnik <bkoz@redhat.com> 1.32.0-1
431 - Update to 1.32.0
432
433 * Wed Sep 22 2004 Than Ngo <than@redhat.com> 1.31.0-9
434 - cleanup specfile
435 - fix multiarch problem
436
437 * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
438 - rebuilt
439
440 * Wed May 05 2004 Warren Togami <wtogami@redhat.com> 1.31.0-7
441 - missing Obsoletes boost-python
442
443 * Mon May 03 2004 Benjamin Kosnik <bkoz@redhat.com> 
444 - (#121630: gcc34 patch needed)
445
446 * Wed Apr 21 2004 Warren Togami <wtogami@redhat.com>
447 - #121415 FC2 BLOCKER: Obsoletes boost-python-devel, boost-doc
448 - other cleanups
449
450 * Tue Mar 30 2004 Benjamin Kosnik <bkoz@redhat.com> 
451 - Remove bjam dependency. (via Graydon).
452 - Fix installed library names.
453 - Fix SONAMEs in shared libraries.
454 - Fix installed header location.
455 - Fix installed permissions.
456
457 * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
458 - rebuilt
459
460 * Mon Feb 09 2004 Benjamin Kosnik <bkoz@redhat.com> 1.31.0-2
461 - Update to boost-1.31.0
462
463 * Thu Jan 22 2004 Benjamin Kosnik <bkoz@redhat.com> 1.31.0-1
464 - Update to boost-1.31.0.rc2
465 - (#109307:  Compile Failure with boost libraries)
466 - (#104831:  Compile errors in apps using Boost.Python...)
467 - Unify into boost, boost-devel rpms.
468 - Simplify installation using bjam and prefix install.
469
470 * Tue Sep 09 2003 Nalin Dahyabhai <nalin@redhat.com> 1.30.2-2
471 - require boost-devel instead of devel in subpackages which require boost-devel
472 - remove stray Prefix: tag
473
474 * Mon Sep 08 2003 Benjamin Kosnik <bkoz@redhat.com> 1.30.2-1
475 - change license to Freely distributable
476 - verify installation of libboost_thread
477 - more boost-devel removals
478 - deal with lack of _REENTRANT on ia64/s390
479 - (#99458) rpm -e fixed via explict dir additions
480 - (#103293) update to 1.30.2
481
482 * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
483 - rebuilt
484
485 * Tue May 13 2003 Florian La Roche <Florian.LaRoche@redhat.de>
486 - remove packager, change to new Group:
487
488 * Tue May 06 2003 Tim Powers <timp@redhat.com> 1.30.0-3
489 - add deffattr's so we don't have unknown users owning files