]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: fix ceph.spec to work with gcephtool
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 9 Dec 2010 19:46:28 +0000 (11:46 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 9 Dec 2010 22:35:48 +0000 (14:35 -0800)
Don't try to package gui_resources unless we are building the GUI.
Get GUI dependencies correct.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
ceph.spec.in

index cd0dad10fd930d822a2d4368abdc87837b4a6166..07ec16fcc55a6cfd0771d2782d01b202a971ed52 100644 (file)
@@ -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 <sage@newdream.net> 0.19.1-5
 - Remove java deps (no need to build hadoop by default)