From e23d620068c3e836fb1b49b105b19eaeef463f9d Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Thu, 9 Dec 2010 11:46:28 -0800 Subject: [PATCH] rpm: fix ceph.spec to work with gcephtool Don't try to package gui_resources unless we are building the GUI. Get GUI dependencies correct. Signed-off-by: Colin McCabe --- ceph.spec.in | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index cd0dad10fd930..07ec16fcc55a6 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1,4 +1,5 @@ %define with_radosgw %{?_with_radosgw: 1} %{!?_with_radosgw: 0} +%define with_gtk2 %{?_with_gtk2: 1} %{!?_with_gtk2: 0} Name: ceph Version: @VERSION@ @@ -52,16 +53,42 @@ implemented as a FastCGI module using libfcgi, and can be used in 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 @@ -125,7 +152,6 @@ fi %{_libdir}/libcrush.so.* %{_libdir}/librados.so.* %{_libdir}/rados-classes/libcls_rbd.so.* -%{_datadir}/ceph_tool/gui_resources/* /sbin/mkcephfs /sbin/mount.ceph %{_libdir}/ceph @@ -191,6 +217,12 @@ fi %{_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 0.19.1-5 - Remove java deps (no need to build hadoop by default) -- 2.39.5