%define with_radosgw %{?_with_radosgw: 1} %{!?_with_radosgw: 0}
+%define with_gtk2 %{?_with_gtk2: 1} %{!?_with_gtk2: 0}
Name: ceph
Version: @VERSION@
conjunction with any FastCGI capable web server.
%endif
+%if %{with_gtk2}
+%package gcephtool
+Summary: Ceph graphical monitoring tool
+Group: System Environment/Base
+License: LGPLv2
+Requires: gtk2 gtkmm24
+BuildRequires: gtk2-devel gtkmm24-devel
+
+%description gcephtool
+gcephtool is a graphical monitor for the clusters running the Ceph distributed
+file system.
+%endif
+
%prep
%setup -q
%build
./autogen.sh
+MY_CONF_OPT=""
+
%if %{with_radosgw}
-%{configure} --prefix=/usr --sbindir=/sbin --sysconfdir=/etc --without-hadoop --with-radosgw
+MY_CONF_OPT="$MY_CONF_OPT --with-radosgw"
%else
-%{configure} --prefix=/usr --sbindir=/sbin --sysconfdir=/etc --without-hadoop --without-radosgw
+MY_CONF_OPT="$MY_CONF_OPT --without-radosgw"
%endif
+
+%if %{with_gtk2}
+MY_CONF_OPT="$MY_CONF_OPT --with-gtk2"
+%else
+MY_CONF_OPT="$MY_CONF_OPT --without-gtk2"
+%endif
+
+%{configure} --prefix=/usr --sbindir=/sbin \
+--localstatedir=/var --sysconfdir=/etc \
+--without-hadoop $MY_CONF_OPT
+
make -j$(getconf _NPROCESSORS_ONLN) CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
%install
%{_libdir}/libcrush.so.*
%{_libdir}/librados.so.*
%{_libdir}/rados-classes/libcls_rbd.so.*
-%{_datadir}/ceph_tool/gui_resources/*
/sbin/mkcephfs
/sbin/mount.ceph
%{_libdir}/ceph
%{_bindir}/radosgw_admin
%endif
+%if %{with_gtk2}
+%files gcephtool
+%defattr(-,root,root,-)
+%{_datadir}/ceph_tool/gui_resources/*
+%endif
+
%changelog
* Fri Apr 30 2010 Sage Weil <sage@newdream.net> 0.19.1-5
- Remove java deps (no need to build hadoop by default)