Summary: The Boost C++ Libraries Name: boost Version: 1.37.0 Release: 1 License: Boost Software License - Version 1.0 Group: System Environment/Libraries URL: http://www.boost.org Source0: %{name}_1_37_0.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libstdc++-devel BuildRequires: bzip2-libs BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: python-devel BuildRequires: libicu-devel Patch0: boost-configure.patch Patch1: boost-gcc-soname.patch Patch2: boost-use-rpm-optflags.patch %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 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.37.0-1 Provides: boost-devel-static = %{version}-%{release} %description static Static Boost C++ libraries. %package doc Summary: The Boost C++ html docs Group: Documentation Provides: boost-python-docs = %{version}-%{release} %description doc HTML documentation files for Boost C++ libraries. %prep %setup -q -n %{name}_1_37_0 %patch0 -p0 %patch1 -p0 %patch2 -p0 %build staged_dir=stage PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]') PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION" ./configure \ -prefix=/usr/local $PYTHON_FLAGS make all %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir} mkdir -p $RPM_BUILD_ROOT%{_includedir} mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} # install lib for i in `find stage -type f -name \*.a`; do NAME=`basename $i`; install -p -m 0644 $i $RPM_BUILD_ROOT%{_libdir}/$NAME; done; for i in `find stage -type f -name \*.so`; do NAME=$i; SONAME=$i.4; VNAME=$i.%{version}; base=`basename $i` NAMEbase=$base; SONAMEbase=$base.4; VNAMEbase=$base.%{version}; mv $i $VNAME; ln -s $VNAMEbase $SONAME; ln -s $VNAMEbase $NAME; install -p -m 755 $VNAME $RPM_BUILD_ROOT%{_libdir}/$VNAMEbase; mv $SONAME $RPM_BUILD_ROOT%{_libdir}/$SONAMEbase; mv $NAME $RPM_BUILD_ROOT%{_libdir}/$NAMEbase; done; # install include files find %{name} -type d | while read a; do mkdir -p $RPM_BUILD_ROOT%{_includedir}/$a find $a -mindepth 1 -maxdepth 1 -type f \ | xargs -r install -m 644 -p -t $RPM_BUILD_ROOT%{_includedir}/$a done # install doc files DOCPATH=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ 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 -r mkdir -p cat tmp-doc-directories | while read a; do find $a -mindepth 1 -maxdepth 1 -name \*.htm\* \ | xargs install -m 644 -p -t $DOCPATH$a done rm tmp-doc-directories install -p -m 644 -t $DOCPATH LICENSE_1_0.txt index.htm # remove scripts used to generate include files find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec rm {} \; %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_libdir}/*.so.%{version} %{_libdir}/*.so.4 %files devel %defattr(-,root,root,-) %{_includedir}/boost %{_libdir}/*.so %files static %defattr(-,root,root,-) %{_libdir}/*.a %files doc %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %changelog * Mon Nov 3 2008 - modified for boost 1.37.0 - modified lib naming as system - divide packages into devel, static, doc * Sun Nov 2 2008 - modified install make options * Wed Oct 22 2008 - modified for boost 1.36.0 * Tue Jul 1 2008 - Initial build.