--- heartbeat.spec	2006-08-16 12:43:20.000000000 -0400
+++ heartbeat-2.0.7/heartbeat.spec	2006-08-14 00:38:40.000000000 -0400
@@ -1,38 +1,9 @@
-#	$Id: heartbeat.spec.in,v 1.188 2006/07/13 16:32:18 alan Exp $
+#	$Id: heartbeat.spec.in,v 1.196 2006/08/14 04:22:04 alan Exp $
 
 %define _unpackaged_files_terminate_build 1
 %define _missing_doc_files_terminate_build 1
-
-# Setup defaults
-%{!?_with_mgmt: %{!?_without_mgmt: %define _without_mgmt --disable-mgmt}}
-%{!?_with_snmp: %{!?_without_snmp: %define _with_snmp --enable-snmp-subagent}}
-
-%{?_without_snmp: %define _without_snmp --disable-snmp-subagent}
-%{?_with_mgmt: %define _with_mgmt --enable-mgmt}
-
-# use "rpmbuild --with mgmt" or "rpm --define '_with_mgmt 1'" (for RPM 3.x)
-# to enable GUI Management Client (disabled by default)
-%{?_with_mgmt:%define ENABLE_MGMT 1}
-%{!?_with_mgmt:%define ENABLE_MGMT 0}
-
-# use "rpmbuild --without snmp" or "rpm --define '_without_snmp 1'" (for RPM 3.x)
-# to enable SNMP Subagent (enabled by default)
-%{?_with_snmp:%define ENABLE_SNMP_SUBAGENT 1}
-%{!?_with_snmp:%define ENABLE_SNMP_SUBAGENT 0}
-
-%if %{ENABLE_SNMP_SUBAGENT}
-%define snmp_prereq net-snmp-devel, bzip2-devel, lm_sensors-devel, libselinux-devel
-%define snmp_req net-snmp, bzip2, lm_sensors, libselinux
-%else
-%define snmp_req ,
-%define snmp_prereq ,
-%endif
-
-%if %{ENABLE_MGMT}
-%define mgmt_req libglade2, python-gtk
-%else 
-%define mgmt_req ,
-%endif
+%define ENABLE_MGMT 1
+%define ENABLE_SNMP_SUBAGENT 1
 
 Summary: heartbeat - The Heartbeat Subsystem for High-Availability Linux
 Name:	heartbeat
@@ -42,12 +13,11 @@
 URL: http://linux-ha.org/
 Group: Utilities
 Packager: Alan Robertson <alanr@unix.sh>
-Source: http://linux-ha.org/download/heartbeat-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildPrereq: glib-devel, perl, iputils, /usr/bin/ssh, openssl-devel, libnet, pkgconfig, glib2-devel, ncurses-devel, python-devel, gnutls-devel, %{snmp_prereq}
-
+Source: http://linux-ha.org/download/heartbeat-2.0.7.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
+BuildPrereq: glib-devel, , perl, iputils, /usr/bin/ssh, openssl-devel, libnet
 # libnet available from www.ultramonkey.org and others
-Requires: sysklogd, heartbeat-stonith = %{version}-%{release}, heartbeat-pils = %{version}-%{release}, gnutls, ncurses, libnet, %{mgmt_req}, %{snmp_req}
+Requires: sysklogd, heartbeat-stonith = %{version}-%{release}, heartbeat-pils = %{version}-%{release}, libglade2, python-gtk
 BuildRequires: libgcrypt-devel
 
 %package ldirectord
@@ -179,6 +149,7 @@
       themselves and don't appear to be harmful.  They typically
       include a message something like this:
       WARN: Ignoring HA message (op=vote) from XXX: not in our membership list
+    
 * Thu Jul 13 2006  Alan Robertson <alanr@unix.sh> (see doc/AUTHORS file)
 + Version 2.0.6 - bug fix and a few enhancements release
   + Added the ability to start/stop groups from the GUI
@@ -1355,23 +1326,7 @@
 #
 #CFLAGS="${RPM_OPT_FLAGS}" \
 #  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-%if %{ENABLE_MGMT}
-config_flags="${config_flags} --enable-mgmt "
-%else 
-config_flags="${config_flags} --disable-mgmt "
-%endif
-
-%if %{ENABLE_SNMP_SUBAGENT}
-config_flags="${config_flags} --enable-snmp-subagent "
-%else
-config_flags="${config_flags} --disable-snmp-subagent "
-%endif
-
-CFLAGS="${RPM_OPT_FLAGS} -fno-unit-at-a-time" \
-%configure '--with-group-id=90' '--with-ccmuser-id=90' '--disable-ansi' '--enable-bundled_ltdl' '--enable-ltdl-convenience' ${config_flags} 
-#./configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--with-group-id=90' '--with-ccmuser-id=90' '--libexecdir=/usr/lib64' '--libdir=/usr/lib64' '--disable-ansi' '--enable-mgmt' '--enable-bundled_ltdl' '--enable-snmp-subagent' 'CFLAGS= -fno-unit-at-a-time' --enable-ltdl-convenience
-
-CFLAGS="${RPM_OPT_FLAGS} -fno-unit-at-a-time" \
+./configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--with-group-id=90' '--with-ccmuser-id=90' '--libexecdir=/usr/lib64' '--libdir=/usr/lib64' '--disable-ansi' '--enable-mgmt' '--enable-bundled_ltdl' '--enable-snmp-subagent' 'CFLAGS= -fno-unit-at-a-time' --enable-ltdl-convenience
 make
 
 ###########################################################
@@ -1380,97 +1335,97 @@
 #make DESTDIR=$RPM_BUILD_ROOT install-strip
 make DESTDIR=$RPM_BUILD_ROOT install
 (
-  cd $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
-  ln -s %{_sbindir}/ldirectord ldirectord
+  cd $RPM_BUILD_ROOT/etc/ha.d/resource.d
+  ln -s /usr/sbin/ldirectord ldirectord
 )
 
 %if %{ENABLE_MGMT}
-ln -s %{_libdir}/heartbeat/haclient.py $RPM_BUILD_ROOT/usr/bin/hb_gui
+ln -s /usr/lib64/heartbeat/haclient.py $RPM_BUILD_ROOT/usr/bin/hb_gui
 %endif
 
 ###########################################################
 %files
 ###########################################################
 %defattr(-,root,root)
-%dir %{_sysconfdir}/ha.d
-%{_sysconfdir}/ha.d/harc
-%{_sysconfdir}/ha.d/shellfuncs
-%{_sysconfdir}/ha.d/rc.d
-%{_sysconfdir}/ha.d/README.config
-%{_libdir}/heartbeat
-%{_libdir}/libapphb.*
-%{_libdir}/libccmclient.*
-%{_libdir}/libcib.*
-%{_libdir}/libclm.*
-%{_libdir}/libcrmcommon.*
-%{_libdir}/libtransitioner.*
-%{_libdir}/libhbclient.*
-%{_libdir}/liblrm.*
-%{_libdir}/libpengine.*
-%{_libdir}/libplumb.*
-%{_libdir}/libplumbgpl.*
-%{_libdir}/librecoverymgr.*
-%{_libdir}/libstonithd.*
-%{_libdir}/libpe_rules.*
-%{_libdir}/libpe_status.*
-%{_libdir}/ocf
-%{_includedir}/heartbeat
-%{_includedir}/clplumbing
-%{_includedir}/saf
-%{_includedir}/ocf
-%{_sysconfdir}/ha.d/resource.d/
-%config %{_sysconfdir}/init.d/heartbeat
-%config %{_sysconfdir}/logrotate.d/heartbeat
-%dir %{_localstatedir}/lib/heartbeat
-%dir %{_localstatedir}/lib/heartbeat/cores
-%dir %attr (0700, root, -) %{_localstatedir}/lib/heartbeat/cores/root
-%dir %attr (0700, nobody, -) %{_localstatedir}/lib/heartbeat/cores/nobody
-%dir %attr (0700, hacluster, -) %{_localstatedir}/lib/heartbeat/cores/hacluster
-%dir %{_localstatedir}/run
-%dir %{_localstatedir}/run/heartbeat
-%attr (2555, hacluster, haclient) %{_bindir}/cl_status
-%{_bindir}/cl_respawn
-%{_sbindir}/crmadmin 
-%{_sbindir}/cibadmin 
-%{_sbindir}/ccm_tool 
-%{_sbindir}/crm_diff 
-%{_sbindir}/crm_uuid
-%{_sbindir}/crm_mon 
-%{_sbindir}/iso8601			
-%{_sbindir}/crm_master 
-%{_sbindir}/crm_standby
-%{_sbindir}/crm_attribute 
-%{_sbindir}/crm_resource
-%{_sbindir}/crm_verify
-%{_sbindir}/attrd_updater
-%{_sbindir}/crm_failcount
-%{_sbindir}/crm_primitive.py
-%dir %attr (755, hacluster, haclient) %{_localstatedir}/run/heartbeat/ccm
-%dir %attr (750, hacluster, haclient) %{_localstatedir}/run/heartbeat/crm
-%dir %attr (750, hacluster, haclient) %{_localstatedir}/lib/heartbeat/crm
-%dir %attr (750, hacluster, haclient) %{_localstatedir}/lib/heartbeat/pengine
-%doc %{_mandir}/man1/cl_status.1*
-%doc %{_mandir}/man1/ha_logger.1*
-%doc %{_mandir}/man1/hb_standby.1*
-%doc %{_mandir}/man1/hb_takeover.1*
-%doc %{_mandir}/man1/hb_addnode.1*
-%doc %{_mandir}/man1/hb_delnode.1*
-%doc %{_mandir}/man8/heartbeat.8*
-%doc %{_mandir}/man8/apphbd.8*
-%doc %{_mandir}/man8/ha_logd.8*
-%doc %{_mandir}/man8/cibadmin.8*
-%doc %{_defaultdocdir}/doc/heartbeat-%{version}
+%dir /etc/ha.d
+/etc/ha.d/harc
+/etc/ha.d/shellfuncs
+/etc/ha.d/rc.d
+/etc/ha.d/README.config
+/usr/lib64/heartbeat
+/usr/lib64/libapphb.*
+/usr/lib64/libccmclient.*
+/usr/lib64/libcib.*
+/usr/lib64/libclm.*
+/usr/lib64/libcrmcommon.*
+/usr/lib64/libtransitioner.*
+/usr/lib64/libhbclient.*
+/usr/lib64/liblrm.*
+/usr/lib64/libpengine.*
+/usr/lib64/libplumb.*
+/usr/lib64/libplumbgpl.*
+/usr/lib64/librecoverymgr.*
+/usr/lib64/libstonithd.*
+/usr/lib64/libpe_rules.*
+/usr/lib64/libpe_status.*
+/usr/lib/ocf
+/usr/include/heartbeat
+/usr/include/clplumbing
+/usr/include/saf
+/usr/include/ocf
+/etc/ha.d/resource.d/
+%config /etc/init.d/heartbeat
+%config /etc/logrotate.d/heartbeat
+%dir /var/lib/heartbeat
+%dir /var/lib/heartbeat/cores
+%dir %attr (0700, root, -) /var/lib/heartbeat/cores/root
+%dir %attr (0700, nobody, -) /var/lib/heartbeat/cores/nobody
+%dir %attr (0700, hacluster, -) /var/lib/heartbeat/cores/hacluster
+%dir /var/run
+%dir /var/run/heartbeat
+%attr (2555, hacluster, haclient) /usr/bin/cl_status
+/usr/bin/cl_respawn
+/usr/sbin/crmadmin 
+/usr/sbin/cibadmin 
+/usr/sbin/ccm_tool 
+/usr/sbin/crm_diff 
+/usr/sbin/crm_uuid
+/usr/sbin/crm_mon 
+/usr/sbin/iso8601			
+/usr/sbin/crm_master 
+/usr/sbin/crm_standby
+/usr/sbin/crm_attribute 
+/usr/sbin/crm_resource
+/usr/sbin/crm_verify
+/usr/sbin/attrd_updater
+/usr/sbin/crm_failcount
+/usr/sbin/crm_primitive.py
+%dir %attr (755, hacluster, haclient) /var/run/heartbeat/ccm
+%dir %attr (750, hacluster, haclient) /var/run/heartbeat/crm
+%dir %attr (750, hacluster, haclient) /var/lib/heartbeat/crm
+%dir %attr (750, hacluster, haclient) /var/lib/heartbeat/pengine
+%doc /usr/man/man1/cl_status.1*
+%doc /usr/man/man1/ha_logger.1*
+%doc /usr/man/man1/hb_standby.1*
+%doc /usr/man/man1/hb_takeover.1*
+%doc /usr/man/man1/hb_addnode.1*
+%doc /usr/man/man1/hb_delnode.1*
+%doc /usr/man/man8/heartbeat.8*
+%doc /usr/man/man8/apphbd.8*
+%doc /usr/man/man8/ha_logd.8*
+%doc /usr/man/man8/cibadmin.8*
+%doc /usr/share/doc/heartbeat-2.0.7
 %if %{ENABLE_SNMP_SUBAGENT}
-	%{_datadir}/snmp/mibs/LINUX-HA-MIB.mib
+	/usr/share/snmp/mibs/LINUX-HA-MIB.mib
 %endif
 %if %{ENABLE_MGMT}
-	%{_libdir}/libhbmgmt.*
-	%{_libdir}/libhbmgmtclient.*
-	%{_libdir}/libhbmgmtcommon.*
-	%{_libdir}/libhbmgmttls.*
-	%{_sysconfdir}/pam.d/hbmgmtd
-	%{_bindir}/hb_gui
-	%{_datadir}/locale/zh_CN/LC_MESSAGES/haclient.mo
+	/usr/lib64/libhbmgmt.*
+	/usr/lib64/libhbmgmtclient.*
+	/usr/lib64/libhbmgmtcommon.*
+	/usr/lib64/libhbmgmttls.*
+	/etc/pam.d/hbmgmtd
+	/usr/bin/hb_gui
+	/usr/share/locale/zh_CN/LC_MESSAGES/haclient.mo
 %endif
 
 ###########################################################
@@ -1478,14 +1433,14 @@
 %files ldirectord
 ###########################################################
 %defattr(-,root,root)
-%{_sysconfdir}/ha.d/conf
-%{_sbindir}/ldirectord
-%{_sbindir}/supervise-ldirectord-config
-%{_sysconfdir}/logrotate.d/ldirectord
-%{_sysconfdir}/init.d/ldirectord
-%{_sysconfdir}/ha.d/resource.d/ldirectord
-%doc %{_mandir}/man8/ldirectord.8*
-%doc %{_mandir}/man8/supervise-ldirectord-config.8*
+/etc/ha.d/conf
+/usr/sbin/ldirectord
+/usr/sbin/supervise-ldirectord-config
+/etc/logrotate.d/ldirectord
+/etc/init.d/ldirectord
+/etc/ha.d/resource.d/ldirectord
+%doc /usr/man/man8/ldirectord.8*
+%doc /usr/man/man8/supervise-ldirectord-config.8*
 %doc ldirectord/ldirectord.cf
 
 ###########################################################
@@ -1493,23 +1448,23 @@
 %files stonith
 ###########################################################
 %defattr(-,root,root)
-%{_includedir}/stonith
-%{_libdir}/libstonith.*
-%{_libdir}/stonith
-%{_sbindir}/stonith
-%{_sbindir}/meatclient
-%doc %{_mandir}/man8/stonith.8*
-%doc %{_mandir}/man8/meatclient.8*
+/usr/include/stonith
+/usr/lib64/libstonith.*
+/usr/lib64/stonith
+/usr/sbin/stonith
+/usr/sbin/meatclient
+%doc /usr/man/man8/stonith.8*
+%doc /usr/man/man8/meatclient.8*
 
 ###########################################################
 # Files for the PILS library
 %files pils
 ###########################################################
 %defattr(-,root,root)
-%{_includedir}/pils
-%{_libdir}/libpils.*
-%{_libdir}/pils/plugins
-#%{_libdir}/pils
+/usr/include/pils
+/usr/lib64/libpils.*
+/usr/lib64/pils/plugins
+#/usr/lib64/pils
 
 ###########################################################
 %clean
@@ -1519,7 +1474,7 @@
 then
   rm -rf $RPM_BUILD_ROOT
 fi
-rm -rf $RPM_BUILD_DIR/heartbeat-%{version}
+rm -rf $RPM_BUILD_DIR/heartbeat-2.0.7
 
 ###########################################################
 %pre
@@ -1535,11 +1490,11 @@
 else
   GROUPOPT="-g 90"
   if
-    %{_sbindir}/groupadd $GROUPOPT haclient 2>/dev/null
+    /usr/sbin/groupadd $GROUPOPT haclient 2>/dev/null
   then
     : OK we were able to add group haclient
   else
-    %{_sbindir}/groupadd haclient
+    /usr/sbin/groupadd haclient
   fi
 fi
 
@@ -1548,13 +1503,13 @@
 then
   : OK user hacluster already present
 else
-  USEROPT="-g haclient -u 90 -d %{_localstatedir}/lib/heartbeat/cores/hacluster"
+  USEROPT="-g haclient -u 90 -d /var/lib/heartbeat/cores/hacluster"
   if
-    %{_sbindir}/useradd $USEROPT hacluster 2>/dev/null
+    /usr/sbin/useradd $USEROPT hacluster 2>/dev/null
   then
     : OK we were able to add user hacluster
   else
-    %{_sbindir}/useradd hacluster
+    /usr/sbin/useradd hacluster
   fi
 fi
 
