%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define snapshot 770888 Name: fb303 Version: 0.0 Release: 0%{?dist}.20090505svn%{snapshot} Summary: Facebook Bassline Group: Development/Libraries License: ASL 2.0 URL: http://incubator.apache.org/thrift # svn export http://svn.apache.org/repos/asf/incubator/thrift/trunk/contrib/fab303 -r %{snapshot} fb303-0.0 # tar -czf fb303-0.0.tar.gz fb303-0.0/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: %{name} = %{version}-%{release} BuildRequires: byacc BuildRequires: boost-devel >= 1.33.1 BuildRequires: flex BuildRequires: libevent-devel BuildRequires: libtool BuildRequires: thrift BuildRequires: thrift-cpp-devel BuildRequires: zlib-devel %description Facebook Baseline is a standard interface to monitoring, dynamic options and configuration, uptime reports, activity, and more. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package python Summary: Python bindings for %{name} Group: Development/Libraries BuildRequires: python-devel Requires: thrift-python %description python Python bindings for %{name}. %prep %setup -q # Fix non-executable-script error sed -i '/^#!\/usr\/bin\/env python/,+1 d' \ py/fb303_scripts/*.py \ py/fb303/FacebookBase.py %build ./bootstrap.sh %configure --enable-static=no --with-thriftpath=%{_prefix} %{__make} %{?_smp_mflags} %install rm -rf %{buildroot} # Fix install path sed -i 's/shareddir = lib/shareddir = ${prefix}\/lib/g' cpp/Makefile %{__make} DESTDIR=%{buildroot} install # Fix lib install path on x86_64 mv %{buildroot}/usr/lib/libfb303.so %{buildroot}%{_libdir}/libfb303.so || true %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc README %{_datadir}/fb303 %{_libdir}/*.so %files devel %defattr(-,root,root,-) %doc README %{_includedir}/thrift/fb303 %files python %defattr(-,root,root,-) %doc README %{python_sitelib}/%{name} %{python_sitelib}/%{name}_scripts %changelog * Wed May 01 2009 Silas Sewell - 0.0-0.20090505svn770888 - Remove subpackages which don't build on EL5 * Fri May 01 2009 Silas Sewell - 0.0-0.20090501svn770888 - Initial build