Thursday, February 12, 2009

RPM spec for Boost (libboost) RPM on CentOS 5.2

CentOS 5.2 ships with Boost 1.33.1 while I needed 1.38. So made my own RPM. The spec is not very well built and I might have missed out many conditions. The boost make and install does not place the files in standard folders, so I have to move around the files a bit. Anyway, here it is:

Summary: The Boost C++ Libraries
Name: boost
Version: 1.38.0
Release: 1
Source0: %{name}-%{version}.tar.gz
License: Boost Software License
Group: System Environment/Libraries
BuildRoot: %{_builddir}/%{name}-%{version}-root
Prereq: /sbin/ldconfig
BuildRequires: libstdc++-devel python
Obsoletes: boost <= 1.37.9
Obsoletes: boost-devel <= 1.37.9
Obsoletes: boost-doc <= 1.37.9

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}

%description devel
Headers for the Boost C++ libraries

%setup -q
./configure --prefix=$RPM_BUILD_ROOT
make install
mkdir -p $RPM_BUILD_ROOT/usr
mv $RPM_BUILD_ROOT/include/boost-1_38/boost $RPM_BUILD_ROOT/include/
rmdir $RPM_BUILD_ROOT/include/boost-1_38

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


Unknown said...

Have you by any chance tried to build an RPM for boost-1.39.0?

Tanmay said...

No Martin, I haven't done it for boost 1.39. Will surely post if I do.

Unknown said...

I modified Fedora 11 boost spec file to get boost and boost-devel 1.39.0 RPM to build (Fedora 11 spec file is for boost 1.37.0). Send me a mail if you want a copy of the spec file.