Boost logo

Boost :

From: Patrick Hartling (patrick_at_[hidden])
Date: 2006-05-15 15:39:43

In my company's use of Boost, we have found that the Boost RPM installed
with Linux distributions such as Fedora Core and Red Hat Enterprise Linux
does not quite meet our needs. This happens because that RPM does not
install the multi-threaded versions of the libraries, nor does it preserve
the version information on the installed libraries. I have attached an RPM
spec file that addresses these issues and that allows targeting 32-bit Linux
from an x86_64 installation (though it has to exclude Boost.Python and

Personally, I would like to see Boost RPMs built that follow the existing
Boost conventions more closely, but that may not be a popular view. If
nothing else, I thought that posting this file would be helpful to people
who have run into the same issues that we have seen.


Patrick L. Hartling                    | VP Engineering, Infiscape Corp.
PGP:          |

%define tarball_name boost_1_33_1

%define python_arch %(python -c 'import os; print os.uname()[4]')

%if %{python_arch} == %{_arch}
%define build_python 1
%define build_python 0

Name: boost
Summary: The Boost C++ Libraries
Version: 1.33.1
Release: 1
License: Boost Software License
Group: System Environment/Libraries
Source: %{tarball_name}.tar.bz2
BuildRoot: %{_tmppath}/boost-%{version}-root
Prereq: /sbin/ldconfig
BuildRequires: libstdc++-devel python
Obsoletes: boost <= 1.33.0
Obsoletes: boost-devel <= 1.33.0
Obsoletes: boost-doc <= 1.33.0
%if %{build_python}
Obsoletes: boost-python <= 1.33.0

Boost provides free peer-reviewed portable C++ source libraries. The
emphasis is on libraries which work well with the C++ Standard
Library. One goal is to establish "existing practice" and provide
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 devel
Summary: The Boost C++ Headers
Group: System Environment/Libraries
Requires: boost = %{version}-%{release}
%if %{build_python}
Obsoletes: boost-python-devel <= 1.33.0
Provides: boost-python-devel = %{version}-%{release}

%description devel
Headers for the Boost C++ libraries

%package doc
Summary: The Boost C++ html docs
Group: System Environment/Libraries
Requires: boost = %{version}-%{release}
%if %{build_python}
Provides: boost-python-docs = %{version}-%{release}

%description doc
HTML documentation files for Boost C++ libraries


%setup -n %{tarball_name} -q

%ifarch i386 i486 i586 i686
%define arch_args <cflags>-m32 <cxxflags>-m32 <linkflags>-m32 <linkflags>-L/usr/lib
%ifarch x86_64
%define arch_args <cflags>-m64 <cxxflags>-m64 <linkflags>-m64 <linkflags>-L/usr/lib64

%if %{build_python} == 0
without_libs="$without_libs --without-python"
# This is a hack. A better way needs to be devised for determining when
# the local architecture does not match the target architecture.
%if %{python_arch} != %{_arch}
without_libs="$without_libs --without-iostreams"
#build bjam
(cd tools/build/jam_src && ./
#build boost with bjam
BJAM=`find tools/build/jam_src/ -name bjam -a -type f`
PYTHON_VERSION=`python -V 2>&1 |sed 's,.* \([0-9]\.[0-9]\)\(\.[0-9]\)\?.*,\1,'`
$BJAM $PYTHON_FLAGS "-sTOOLS=gcc" "-sBUILD=release <threading>single/multi %{arch_args}" "--prefix=$RPM_BUILD_ROOT%{_prefix}" $without_libs stage

mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_docdir}
mkdir -p $RPM_BUILD_ROOT%{_docdir}/boost-%{version}

tar -C stage/lib -cvf - . | tar -C $RPM_BUILD_ROOT%{_libdir} -xpf -

# install include files
for i in `find boost -type d`; do
  mkdir -p $RPM_BUILD_ROOT%{_includedir}/$i
for i in `find boost -type f`; do
  install -m 644 $i $RPM_BUILD_ROOT%{_includedir}/$i

#install doc files
cd doc/html;
for i in `find . -type d`; do
  mkdir -p $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i
for i in `find . -type f`; do
  install -m 644 $i $RPM_BUILD_ROOT%{_docdir}/boost-%{version}/$i
cd ../..;




%defattr(-, root, root)

%files devel
%defattr(-, root, root)

%files doc
%defattr(-, root, root)

* Apr 14 2006 Patrick Hartling <patrick_at_[hidden]> 1.33.1-1
- Update to 1.33.1
- Install single- and multi-threaded libraries
- Install fully versioned libraries
- Allow 32-bit build to be made on 64-bit architecture (currently without
  Boost.Python or Boost.iostreams)

* Mon Nov 29 2004 Benjamin Kosnik <bkoz_at_[hidden]> 1.32.0-1
- Update to 1.32.0
- (#122817: libboost_*.so symlinks missing)

* Wed Sep 22 2004 Than Ngo <than_at_[hidden]> 1.31.0-9
- cleanup specfile
- fix multiarch problem

* Tue Jun 15 2004 Elliot Lee <sopwith_at_[hidden]>
- rebuilt

* Wed May 05 2004 Warren Togami <wtogami_at_[hidden]> 1.31.0-7
- missing Obsoletes boost-python

* Mon May 03 2004 Benjamin Kosnik <bkoz_at_[hidden]>
- (#121630: gcc34 patch needed)

* Wed Apr 21 2004 Warren Togami <wtogami_at_[hidden]>
- #121415 FC2 BLOCKER: Obsoletes boost-python-devel, boost-doc
- other cleanups

* Tue Mar 30 2004 Benjamin Kosnik <bkoz_at_[hidden]>
- Remove bjam dependency. (via Graydon).
- Fix installed library names.
- Fix SONAMEs in shared libraries.
- Fix installed header location.
- Fix installed permissions.

* Fri Feb 13 2004 Elliot Lee <sopwith_at_[hidden]>
- rebuilt

* Mon Feb 09 2004 Benjamin Kosnik <bkoz_at_[hidden]> 1.31.0-2
- Update to boost-1.31.0

* Thu Jan 22 2004 Benjamin Kosnik <bkoz_at_[hidden]> 1.31.0-1
- Update to boost-1.31.0.rc2
- (#109307: Compile Failure with boost libraries)
- (#104831: Compile errors in apps using Boost.Python...)
- Unify into boost, boost-devel rpms.
- Simplify installation using bjam and prefix install.

* Tue Sep 09 2003 Nalin Dahyabhai <nalin_at_[hidden]> 1.30.2-2
- require boost-devel instead of devel in subpackages which require boost-devel
- remove stray Prefix: tag

* Mon Sep 08 2003 Benjamin Kosnik <bkoz_at_[hidden]> 1.30.2-1
- change license to Freely distributable
- verify installation of libboost_thread
- more boost-devel removals
- deal with lack of _REENTRANT on ia64/s390
- (#99458) rpm -e fixed via explict dir additions
- (#103293) update to 1.30.2

* Wed Jun 04 2003 Elliot Lee <sopwith_at_[hidden]>
- rebuilt

* Tue May 13 2003 Florian La Roche <Florian.LaRoche_at_[hidden]>
- remove packager, change to new Group:

* Tue May 06 2003 Tim Powers <timp_at_[hidden]> 1.30.0-3
- add deffattr's so we don't have unknown users owning files

Boost list run by bdawes at, gregod at, cpdaniel at, john at