# # Documentation: as the %%doc macro erases the target directory, namely # $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}, manully installed documentation # must be saved into a temporary dedicated directory. %define mydocs __tmp_docdir # # Boost-CMake needs a variable to be defined for the lib directory on # 64bit platforms (http://gitorious.org/boost/cmake/blobs/raw/1.40.0/tools/build/CMake/docs/build/html/build_configuration.html#boost-install-lib-subdir-name) %if "%{?_lib}" == "lib64" %define _cmake_lib_suffix -DBOOST_INSTALL_LIB_SUBDIR_NAME=lib64 %endif # # Support for long double %define disable_long_double 0 %ifarch %{arm} %define disable_long_double 1 %endif # Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.40.0 Release: 1%{?dist} License: Boost URL: http://sodium.resophonic.com/boost-cmake/%{version}.cmake4/ Group: System Environment/Libraries %define full_version %{name}-%{version}.cmake5 Source: %{full_version}.tar.bz2 # boost is an "umbrella" package that pulls in all other boost components # Hence, the boost package itself does contain only documentation files # (e.g., licence), and no binary. It may therefore be noarch. #%%if 0%{?fedora} >= 10 #BuildArch: noarch #%%endif Requires: boost-accumulators = %{version}-%{release} Requires: boost-date-time = %{version}-%{release} Requires: boost-filesystem = %{version}-%{release} Requires: boost-graph = %{version}-%{release} Requires: boost-iostreams = %{version}-%{release} Requires: boost-math = %{version}-%{release} Requires: boost-mpi = %{version}-%{release} Requires: boost-program-options = %{version}-%{release} Requires: boost-python = %{version}-%{release} Requires: boost-regex = %{version}-%{release} Requires: boost-serialization = %{version}-%{release} Requires: boost-signals = %{version}-%{release} Requires: boost-system = %{version}-%{release} Requires: boost-test = %{version}-%{release} Requires: boost-thread = %{version}-%{release} Requires: boost-wave = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake BuildRequires: libstdc++-devel BuildRequires: bzip2-libs BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: python-devel BuildRequires: libicu-devel BuildRequires: chrpath BuildRequires: mpich2-devel # # From the version 13 of Fedora, the Boost libraries are delivered with # sonames equal to the Boost version (e.g., 1.41.0). Whereas on older versions # of Fedora (e.g., Fedora 12), the Boost libraries are delivered with # another scheme for sonames (e.g., a soname of 5 for Fedora 12). %if 0%{?fedora} >= 13 %define sonamever %{version} %else %define sonamever 5 %endif # The following fixes have normally been fixed on the 1.41.0 branch/release Patch0: boost-mpi-graph-compilation-fix.patch # Temporary work-around, to set the soname equal to 5, so as to be compatible # with the Boost version delivered on Fedora 12 (Boost version 1.39.0, with # a soname version of 5). Patch1: boost-cmake-soname-5.patch #Patch2: boost-cmake-donot-build-tools.patch %bcond_with tests %bcond_with docs_generated %description Boost provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ Standard Library, in the hopes of establishing "existing practice" for extensions and providing reference implementations so that the Boost libraries are suitable for eventual standardization. (Some of the libraries have already been proposed for inclusion in the C++ Standards Committee's upcoming C++ Standard Library Technical Report.) %package accumulators Summary: Runtime component of boost accumulators library Group: System Environment/Libraries %description accumulators Runtime support for Boost Accumulators, set of libraries for statistical collection. %package date-time Summary: Runtime component of boost date-time library Group: System Environment/Libraries %description date-time Runtime support for Boost Date Time, set of date-time libraries based on generic programming concepts. %package filesystem Summary: Runtime component of boost filesystem library Group: System Environment/Libraries %description filesystem Runtime support for the Boost Filesystem Library, which provides portable facilities to query and manipulate paths, files, and directories. %package graph Summary: Runtime component of boost graph library Group: System Environment/Libraries %description graph Runtime support for the BGL graph library. BGL interface and graph components are generic, in the same sense as the the Standard Template Library (STL). %package iostreams Summary: Runtime component of boost iostreams library Group: System Environment/Libraries %description iostreams Runtime support for Boost.IOStreams, a framework for defining streams, stream buffers and i/o filters. %package math Summary: Runtime component of boost math library Group: System Environment/Libraries %description math Runtime support Boost.Math, a library of math and numeric tools. %package test Summary: Runtime component of boost test library Group: System Environment/Libraries %description test Runtime support for simple program testing, full unit testing, and for program execution monitoring. %package program-options Summary: Runtime component of boost program_options library Group: System Environment/Libraries %description program-options Runtime support of boost program options library, which allows program developers to obtain (name, value) pairs from the user, via conventional methods such as command line and config file. %package python Summary: Runtime component of boost python library Group: System Environment/Libraries %description python The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler. This package contains runtime support for Boost Python Library. %package regex Summary: Runtime component of boost regular expression library Group: System Environment/Libraries %description regex Runtime support for boost regular expression library. %package serialization Summary: Runtime component of boost serialization library Group: System Environment/Libraries %description serialization Runtime support for serialization for persistence and marshalling. %package signals Summary: Runtime component of boost signals and slots library Group: System Environment/Libraries %description signals Runtime support for managed signals & slots callback implementation. %package system Summary: Runtime component of boost system support library Group: System Environment/Libraries %description system Runtime component of Boost operating system support library, including the diagnostics support that will be part of the C++0x standard library. %package wave Summary: Runtime component of boost C99/C++ preprocessing library Group: System Environment/Libraries %description wave Runtime support for the Boost.Wave library, a Standards conformant, and highly configurable implementation of the mandated C99/C++ preprocessor functionality. %package mpi Summary: Runtime component of boost mpi library Group: System Environment/Libraries %description mpi Runtime support for Boost MPI, library providing a clean C++ API over the OpenMPI implementation of MPI. %package thread Summary: Runtime component of boost thread library Group: System Environment/Libraries %description thread Runtime component Boost.Thread library, which provides classes and functions for managing multiple threads of execution, and for synchronizing data between the threads or providing separate copies of data specific to individual threads. %package devel Summary: The Boost C++ headers and shared development libraries Group: Development/Libraries Requires: boost = %{version}-%{release} Provides: boost-python-devel = %{version}-%{release} %description devel Headers and shared object symlinks for the Boost C++ libraries. %package static Summary: The Boost C++ static development libraries Group: Development/Libraries Requires: boost-devel = %{version}-%{release} Obsoletes: boost-devel-static < 1.34.1-14 Provides: boost-devel-static = %{version}-%{release} %description static Static Boost C++ libraries. %package doc Summary: HTML documentation for the Boost C++ libraries Group: Documentation %if 0%{?fedora} >= 10 BuildArch: noarch %endif Provides: boost-python-docs = %{version}-%{release} %description doc This package contains the documentation in the HTML format of the Boost C++ libraries. The documentation provides the same content as that on the Boost web page (http://www.boost.org/doc/libs/1_40_0). %prep %setup -q -n %{full_version} %patch0 -p1 %if 0%{?fedora} == 12 %patch1 -p1 %endif #%%patch2 -p1 %build %{__mkdir_p} build cd build %cmake -DENABLE_SINGLE_THREADED=YES .. make VERBOSE=1 %{?_smp_mflags} cd %{_builddir}/%{full_version} %check %if %{with tests} echo "
" `uname -a` "
" > status/regression_comment.html echo "" >> status/regression_comment.html echo "" `g++ --version` "
" >> status/regression_comment.html echo "" >> status/regression_comment.html # Standard test with CMake #ctest results1=status/cs-`uname`.html results2=status/cs-`uname`-links.html email=benjamin.kosnik@gmail.com if [ -f $results1 ] && [ -f $results2 ]; then echo "sending results starting" testdate=`date +%Y%m%d` testarch=`uname -m` results=boost-results-$testdate-$testarch.tar.bz2 tar -cvf boost-results-$testdate-$testarch.tar $results1 $results2 bzip2 -f boost-results-$testdate-$testarch.tar echo | mutt -s "$testdate boost regression $testarch" -a $results $email echo "sending results finished" else echo "error sending results" fi %endif %install %{__rm} -rf $RPM_BUILD_ROOT cd %{_builddir}/%{full_version}/build DESTDIR=$RPM_BUILD_ROOT make install VERBOSE=1 # Suppress the wrongly generated mpi.so library # (it is temporary until upstream Boost-CMake fixes that) %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/mpi.so # Prepare the place to temporary store the generated documentation %{__rm} -rf %{mydocs} && %{__mkdir_p} %{mydocs}/html # Install documentation files (HTML pages) within the temporary place cd %{_builddir}/%{full_version} DOCPATH=%{mydocs} find libs doc more -type f \( -name \*.htm -o -name \*.html \) \ | sed -n '/\//{s,/[^/]*$,,;p}' \ | sort -u > tmp-doc-directories sed "s:^:$DOCPATH/:" tmp-doc-directories \ | xargs --no-run-if-empty %{__install} -d cat tmp-doc-directories | while read tobeinstalleddocdir; do find $tobeinstalleddocdir -mindepth 1 -maxdepth 1 -name \*.htm\* \ | xargs %{__install} -p -m 644 -t $DOCPATH/$tobeinstalleddocdir done %{__rm} -f tmp-doc-directories %{__install} -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm index.html # Remove scripts used to generate include files find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{__rm} -f {} \; %clean %{__rm} -rf $RPM_BUILD_ROOT %post date-time -p /sbin/ldconfig %postun date-time -p /sbin/ldconfig %post filesystem -p /sbin/ldconfig %postun filesystem -p /sbin/ldconfig %post graph -p /sbin/ldconfig %postun graph -p /sbin/ldconfig %post iostreams -p /sbin/ldconfig %postun iostreams -p /sbin/ldconfig %post test -p /sbin/ldconfig %postun test -p /sbin/ldconfig %post program-options -p /sbin/ldconfig %postun program-options -p /sbin/ldconfig %post python -p /sbin/ldconfig %postun python -p /sbin/ldconfig %post regex -p /sbin/ldconfig %postun regex -p /sbin/ldconfig %post serialization -p /sbin/ldconfig %postun serialization -p /sbin/ldconfig %post signals -p /sbin/ldconfig %postun signals -p /sbin/ldconfig %post system -p /sbin/ldconfig %postun system -p /sbin/ldconfig %post thread -p /sbin/ldconfig %postun thread -p /sbin/ldconfig %post wave -p /sbin/ldconfig %postun wave -p /sbin/ldconfig %post mpi -p /sbin/ldconfig %postun mpi -p /sbin/ldconfig %files %defattr(-, root, root, -) %doc LICENSE_1_0.txt %files accumulators %defattr(-, root, root, -) %doc LICENSE_1_0.txt %files date-time %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_date_time*.so.%{sonamever} %files filesystem %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_filesystem*.so.%{sonamever} %files graph %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_graph*.so.%{sonamever} %files iostreams %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_iostreams*.so.%{sonamever} %files math %defattr(-, root, root, -) %doc LICENSE_1_0.txt %files test %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_prg_exec_monitor*.so.%{sonamever} %{_libdir}/libboost_unit_test_framework*.so.%{sonamever} %files program-options %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_program_options*.so.%{sonamever} %files python %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_python*.so.%{sonamever} %files regex %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_regex*.so.%{sonamever} %files serialization %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_serialization*.so.%{sonamever} %{_libdir}/libboost_wserialization*.so.%{sonamever} %files signals %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_signals*.so.%{sonamever} %files system %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_system*.so.%{sonamever} %files thread %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_thread*.so.%{sonamever} %files wave %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_wave*.so.%{sonamever} %files mpi %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/libboost_mpi*.so.%{sonamever} %files doc %defattr(-, root, root, -) %doc %{mydocs}/* %files devel %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_includedir}/%{name} %{_libdir}/%{name} %{_libdir}/*.so %{_datadir}/%{name} %files static %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/*.a %changelog * Mon Dec 02 2009 Denis Arnaud