File pacemaker-pygui.spec of Package pacemaker-pygui
#
# spec file for package pacemaker-pygui (Version 1.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define with_extra_warnings 0
%define with_debugging 0
%define without_fatal_warnings 1
%define pkg_group Productivity/Clustering/HA
%if 0%{?fedora_version}
%define pkg_group System Environment/Daemons
%endif
%define gname haclient
%define uname hacluster
Name: pacemaker-pygui
Summary: Management Tools for Pacemaker based HA solution
Version: 1.4
Release: 14
License: GPL v2 or later
Url: http://hg.clusterlabs.org/pacemaker/pygui
Group: Productivity/Clustering/HA
Source: pygui.tar.bz2
Source1: pacemaker_starter.py
Source2: pacemaker-starter.glade
#Patch0: cluster_report.diff
#Patch1: quit_on_display_error.diff
#Patch2: snmp_agent_select.diff
#Patch3: frontend-validate.diff
#Patch4: clone-real-id.diff
#Patch5: return_code.diff
#Patch6: sort-by-call-id.diff
#Patch7: improve_stack_checking.diff
#Patch8: dont_check_ais_messaging.diff
#Patch9: dont-propose-id-in-wizard-mode.diff
Patch10: pacemaker-api.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Requires: pyxml graphviz-python python-gtk python-lxml
BuildRequires: heartbeat-devel libheartbeat-devel libopenais-devel libpacemaker-devel
BuildRequires: e2fsprogs-devel glib2-devel gnutls-devel libxml2-devel ncurses-devel pam-devel python-devel swig
BuildRequires: net-snmp-devel
%if 0%{?suse_version}
%if 0%{?suse_version} == 930
BuildRequires: rpm-devel
%endif
%if 0%{?suse_version} == 1000
BuildRequires: lzo lzo-devel
%endif
%if 0%{?suse_version} < 1020
BuildRequires: tcpd-devel
%endif
%if 0%{?sles_version} == 9
BuildRequires: openssl-devel pkgconfig rpm-devel
%endif
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: lm_sensors-devel openssl-devel which
%endif
%if 0%{?rhel_version} == 406
BuildRequires: libselinux-devel
%endif
%if 0%{?rhel_version} == 406
BuildRequires: gcc-c++ kernel
%endif
%if 0%{?fedora_version} == 8
BuildRequires: openssl-devel
%endif
%if 0%{?mandriva_version}
BuildRequires: libbzip2-devel openssl-devel
%endif
%description
pacemaker-pygui includes a server/client GUI and a snmp plugin, to help
to manage and monitor pacemaker based HA solution.
Authors:
--------
Yan Gao <ygao@novell.com>
%package devel
License: LGPL v2.0 or later
Summary: Include Files and Libraries for pacemaker-pygui
Group: Productivity/Clustering/HA
Requires: %{name} = %{version}-%{release}
%description devel
The package includes libraries and files to develop for pacemaker-pygui
server.
Authors:
--------
Yan Gao <ygao@novell.com>
%prep
###########################################################
%setup -n pygui
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
#%patch6 -p1
#%patch7 -p1
#%patch8 -p1
#%patch9 -p1
%patch10 -p1
###########################################################
%build
# TODO: revisit -all
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
# Feature-dependent CFLAGS:
%if %with_extra_warnings
# CFLAGS="${CFLAGS} -Wshadow -Wfloat-equal -Waggregate-return -Wnested-externs -Wunreachable-code -Wendif-labels -Winline"
CFLAGS="${CFLAGS} -Wfloat-equal -Wendif-labels -Winline"
%endif
%if %with_debugging
CFLAGS="${CFLAGS} -O0"
%endif
# Distribution specific settings:
%if 0%{?suse_version} > 1001
CFLAGS="${CFLAGS} -fstack-protector-all"
%endif
%if 0%{?suse_version} < 1001
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gnome/%{_lib}/pkgconfig:/opt/gnome/share/pkgconfig"
%endif
%if 0%{?suse_version} > 1020
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
%if 0%{?fedora_version} > 6
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
export CFLAGS
./ConfigureMe configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
--localstatedir=%{_var} --infodir=%{_infodir} \
--mandir=%{_mandir} --libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--with-group-name=%{gname} --with-ccmuser-name=%{uname} \
--with-hapkgversion=%{version} \
--enable-glib-malloc \
--enable-snmp-subagent \
--with-mibsdir=%{_datadir}/snmp/mibs \
%if %without_fatal_warnings
--enable-fatal-warnings=no \
%endif
--enable-pretty
pushd snmp_subagent
ln -sf /usr/lib/libclm.so.1.0.0 libclm.so
ln -sf /usr/lib/libccmclient.so.1.0.0 libccmclient.so
ln -sf /usr/lib/libhbclient.so.1.0.0 libhbclient.so
popd
export MAKE="make %{?jobs:-j%jobs}"
make %{?jobs:-j%jobs}
###########################################################
%install
###########################################################
#make DESTDIR=$RPM_BUILD_ROOT install-strip
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
#install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/heartbeat-gui
#install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/heartbeat-gui
#pushd $RPM_BUILD_ROOT/usr/bin
#ln -sf ../share/heartbeat-gui/pacemaker_starter.py pacemaker_starter
#popd
rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/pacemaker-mgmt
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/pacemaker-pygui
install -m 644 -T snmp_subagent/README.hbagent $RPM_BUILD_ROOT/usr/share/doc/packages/pacemaker-pygui/README.hbagent
install -m 644 snmp_subagent/README.hbagentv2 $RPM_BUILD_ROOT/usr/share/doc/packages/pacemaker-pygui
# Cleanup
[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man
[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
###########################################################
%clean
###########################################################
if
[ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]
then
rm -rf $RPM_BUILD_ROOT
fi
rm -rf $RPM_BUILD_DIR/pygui
###########################################################
%pre
%preun
# Use the following if more commands need to be executed
# %post
# /sbin/ldconfig
# [...]
# http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%{_includedir}/heartbeat/mgmt
%{_includedir}/heartbeat/mgmt/mgmt.h
%{_includedir}/heartbeat/mgmt/mgmt_client.h
%{_includedir}/heartbeat/mgmt/mgmt_common.h
%{_includedir}/heartbeat/mgmt/mgmt_tls.h
%{_includedir}/heartbeat/mgmt_config.h
%files
###########################################################
%defattr(-,root,root)
%dir %{_libdir}/heartbeat
%{_sysconfdir}/pam.d/hbmgmtd
%{_bindir}/hb_gui
%{_bindir}/crm_gui
#%{_bindir}/pacemaker_starter
%{_libdir}/heartbeat-gui
%{_libdir}/heartbeat-gui/haclient.py
%{_libdir}/heartbeat-gui/pymgmt.py
%{_libdir}/heartbeat/mgmtd
%{_libdir}/heartbeat/mgmtdtest
%{_libdir}/libhbmgmt.so*
%{_libdir}/libhbmgmtclient.so*
%{_libdir}/libhbmgmtcommon.so*
%{_libdir}/libhbmgmttls.so*
%{_libdir}/heartbeat-gui/_pymgmt.so*
%{_libdir}/heartbeat/hbagent
%{_datadir}/heartbeat-gui
#%{_datadir}/heartbeat-gui/*.png
#%{_datadir}/heartbeat-gui/*.glade
#%{_datadir}/heartbeat-gui/*.py
%{_datadir}/locale/zh_CN/LC_MESSAGES/haclient.mo
%{_datadir}/snmp/mibs/LINUX-HA-MIB.txt
%{_datadir}/heartbeat/SNMPAgentSanityCheck
%{_docdir}/pacemaker-pygui
%{_docdir}/pacemaker-pygui/*
%changelog
* Fri Mar 20 2009 xwhu@suse.de
- Adapt the newly changed header file
* Tue Mar 10 2009 xwhu@suse.de
- Adapt the API change of CRM
* Fri Mar 06 2009 xwhu@suse.de
- Fix segment of snmp subagent for cib callback
- Improve UI by hiding some advanced options in the simple mode
* Thu Feb 26 2009 xwhu@suse.de
- Remove the intermediate objects when cancel the "add" operation
- Alphabetically sort the list of supported cluster_properties
- Fix treating a cluster property of "time" as "integer"
- Change default attribute of Clone to globally-unique=false
- Add all of the pe-*.bz2 for selecting when viewing transition information
- Do not update the main window if cannot get the CIB default tip
* Mon Feb 16 2009 xwhu@suse.de
- bnc#474867, Shouldn't propose invalid ID in wizard mode
* Tue Feb 10 2009 xwhu@suse.de
- Fix configure problem with latest openais update
* Fri Feb 06 2009 xwhu@suse.de
- bnc#466787, do validation to the frontend
* Fri Jan 23 2009 xwhu@suse.de
- bnc#467964, instance attributes for stonith
- bnc#467967, long description makes window too long
- bnc#468418, hbagent crash on uninitialized fdset
- bnc#467977, document for SNMP agent
* Wed Jan 21 2009 xwhu@suse.de
- bnc#467809, pacemaker-pygui depends on python-gtk
* Fri Dec 12 2008 xwhu@suse.de
- bnc#456430, add a wizard for adding new resources
* Fri Dec 05 2008 xwhu@suse.de
- bnc#455988, GUI should only add provider for ocf resources
- bnc#456380, GUI segfault on wrong DISPLAY setting
- Add support for transition graph
- GUI for node local openais configuration
- Enable snmp agent for pacemaker on openais
* Sat Sep 13 2008 xwhu@suse.de
- First checking