bd974cd
###############################################################################
bd974cd
###############################################################################
bd974cd
##
d5afd52
##  Copyright (C) 2004-2009 Red Hat, Inc.  All rights reserved.
bd974cd
##
bd974cd
##  This copyrighted material is made available to anyone wishing to use,
bd974cd
##  modify, copy, or redistribute it subject to the terms and conditions
bd974cd
##  of the GNU General Public License v.2.
bd974cd
##
bd974cd
###############################################################################
bd974cd
###############################################################################
bd974cd
bd974cd
# main (empty) package
bd974cd
# http://www.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
bd974cd
bd974cd
# keep around ready for later user
d5afd52
## define alphatag rc4
bd974cd
dedd4aa
# When downloading directly from Mercurial, it will automatically add this prefix
dedd4aa
# Invoking 'hg archive' wont but you can add one with:
dedd4aa
#  hg archive -t tgz -p "Cluster-Resource-Agents-" -r $altversion $altversion.tar.gz
dedd4aa
%define altprefix Cluster-Resource-Agents-
dedd4aa
%define altversion 3aa338887920
dedd4aa
bd974cd
Name: resource-agents
bd974cd
Summary: Open Source HA Resource Agents for Red Hat Cluster
bd974cd
Version: 3.0.0
dedd4aa
Release: 14%{?alphatag:.%{alphatag}}%{?dist}
bd974cd
License: GPLv2+ and LGPLv2+
bd974cd
Group: System Environment/Base
bd974cd
URL: http://sources.redhat.com/cluster/wiki/
bd974cd
Source0: ftp://sources.redhat.com/pub/cluster/releases/resource-agents-%{version}%{?alphatag:.%{alphatag}}.tar.gz
dedd4aa
Source1: http://hg.linux-ha.org/agents/archive/%{altversion}.tar.gz
bd974cd
bd974cd
## Runtime deps
bd974cd
Requires: bash grep sed gawk
bd974cd
Requires: net-tools mount e2fsprogs
bd974cd
bd974cd
## Setup/build bits
bd974cd
8da1d6b
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
bd974cd
dedd4aa
# Build dependencies
dedd4aa
BuildRequires: cluster-glue-libs-devel glib2-devel
dedd4aa
BuildRequires: automake autoconf pkgconfig
bd974cd
bd974cd
# we inherit configure from cluster project. Configure it for vars we need.
bd974cd
# building from source directly without those parameters will NOT work.
bd974cd
# See http://www.redhat.com/archives/cluster-devel/2009-February/msg00003.html
dedd4aa
%prep
dedd4aa
%setup -q -n resource-agents-%{version}%{?alphatag:.%{alphatag}} -a 1
dedd4aa
dedd4aa
# prepare rgmanager RAs
dedd4aa
%{_configure} \
bd974cd
  --sbindir=%{_sbindir} \
bd974cd
  --initddir=%{_sysconfdir}/rc.d/init.d \
bd974cd
  --libdir=%{_libdir} \
bd974cd
  --without_fence_agents \
bd974cd
  --disable_kernel_check
bd974cd
dedd4aa
# prepare pacemaker RAs
dedd4aa
cd %{altprefix}%{altversion}
dedd4aa
./autogen.sh
dedd4aa
%{_configure} \
dedd4aa
	CFLAGS="$(echo '%{optflags}')" \
dedd4aa
	--enable-fatal-warnings=no
dedd4aa
dedd4aa
%build
bd974cd
##CFLAGS="$(echo '%{optflags}')" make %{_smp_mflags}
bd974cd
# %{_smp_mflags} is broken from upstream and unrequired for this project.
bd974cd
CFLAGS="$(echo '%{optflags}')" make -C rgmanager/src/resources
dedd4aa
cd %{altprefix}%{altversion}
dedd4aa
make %{_smp_mflags}
bd974cd
bd974cd
%install
8da1d6b
rm -rf %{buildroot}
8da1d6b
make -C rgmanager/src/resources install DESTDIR=%{buildroot}
dedd4aa
make -C %{altprefix}%{altversion} install DESTDIR=%{buildroot}
dedd4aa
dedd4aa
# tree fixup
dedd4aa
rm %{buildroot}/%{_libdir}/heartbeat/ocf-*
dedd4aa
find %{buildroot} -type f -name '.ocf-*' -exec chmod 644 {} \;
dedd4aa
find %{buildroot} -type f -name 'ocf-*' -exec chmod 644 {} \;
dedd4aa
find %{buildroot} -type f -name '*.dtd' -exec chmod 644 {} \;
dedd4aa
chmod 755 %{buildroot}/%{_sbindir}/ocf-tester
dedd4aa
chmod 755 %{buildroot}/%{_datadir}/cluster/ocf-shellfuncs
bd974cd
bd974cd
%clean
8da1d6b
rm -rf %{buildroot}
bd974cd
bd974cd
%description
dedd4aa
A set of scripts to interface with several services to operate in a
dedd4aa
High Availability environment for both Pacemaker and rgmanager
dedd4aa
service managers.
bd974cd
bd974cd
%files
bd974cd
%defattr(-,root,root,-)
bd974cd
%doc doc/COPYING.* doc/COPYRIGHT doc/README.licence
dedd4aa
%doc %{altprefix}%{altversion}/AUTHORS
bd974cd
%{_datadir}/cluster
bd974cd
dedd4aa
%dir /usr/lib/ocf
dedd4aa
%dir /usr/lib/ocf/resource.d
dedd4aa
/usr/lib/ocf/resource.d/heartbeat
dedd4aa
%{_sbindir}/ocf-tester
dedd4aa
%{_sbindir}/sfex_init
dedd4aa
dedd4aa
%dir %{_datadir}/glue
dedd4aa
%doc %{_datadir}/glue/ra-api-1.dtd
dedd4aa
dedd4aa
%dir %{_libdir}/heartbeat
dedd4aa
%{_libdir}/heartbeat/send_arp  
dedd4aa
%{_libdir}/heartbeat/sfex_daemon
dedd4aa
bd974cd
%changelog
dedd4aa
* Wed Jul 29 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-14
dedd4aa
- Merge Pacemaker cluster resource agents:
dedd4aa
  * Add Source1.
dedd4aa
  * Drop noarch. We have real binaries now.
dedd4aa
  * Update BuildRequires.
dedd4aa
  * Update all relevant prep/build/install/files/description sections.
dedd4aa
874d942
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-13
874d942
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
874d942
d5afd52
* Wed Jul  8 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-12
dedd4aa
- spec file updates:
d5afd52
  * Update copyright header
d5afd52
  * final release.. undefine alphatag
d5afd52
9edb429
* Thu Jul  2 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-11.rc4
9edb429
- New upstream release.
9edb429
cbea272
* Sat Jun 20 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-10.rc3
cbea272
- New upstream release.
cbea272
70abb4c
* Wed Jun 10 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-9.rc2
70abb4c
- New upstream release + git94df30ca63e49afb1e8aeede65df8a3e5bcd0970
70abb4c
8da1d6b
* Tue Mar 24 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-8.rc1
8da1d6b
- New upstream release.
8da1d6b
- Update BuildRoot usage to preferred versions/names
8da1d6b
8eed883
* Mon Mar  9 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-7.beta1
8eed883
- New upstream release.
8eed883
dd09b6c
* Fri Mar  6 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-6.alpha7
dd09b6c
- New upstream release.
dd09b6c
904a40a
* Tue Mar  3 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-5.alpha6
904a40a
- New upstream release.
904a40a
6eef531
* Tue Feb 24 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-4.alpha5
6eef531
- Drop Conflicts with rgmanager.
6eef531
bd974cd
* Mon Feb 23 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-3.alpha5
bd974cd
- New upstream release.
bd974cd
bd974cd
* Thu Feb 19 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-2.alpha4
bd974cd
- Add comments on how to build this package.
bd974cd
bd974cd
* Thu Feb  5 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-1.alpha4
bd974cd
- New upstream release.
bd974cd
- Fix datadir/cluster directory ownership.
bd974cd
bd974cd
* Tue Jan 27 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.0.0-1.alpha3
bd974cd
  - Initial packaging