From c1b97c503cf4249777840abe0d96f0518c7ccb42 Mon Sep 17 00:00:00 2001 From: TAKATSUKA Haruka Date: Mon, 15 Oct 2012 16:01:13 +0900 Subject: [PATCH] fix pgpool-ha.spec for pgpool-ha 2.0 , and fix relative files --- INSTALL | 4 ++-- Makefile.in | 10 ++++++++-- pgpool-ha.spec | 43 +++++++++++++++++++++---------------------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/INSTALL b/INSTALL index 743e562..4bc67a1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,9 +1,9 @@ install ======= -# tar zxf pgpool-ha2.tar.gz +# tar jxf pgpool-ha-2.x.tar.bz2 -# cd pgpool-ha2 +# cd pgpool-ha-2.x # ./configure.sh --help options: diff --git a/Makefile.in b/Makefile.in index e46f666..168902c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,6 +21,12 @@ clean: rm -f pgpool distclean: - rm -f pgpool - rm -f Makefile + rm -f pgpool Makefile config.log + +dist: + cp -R . /tmp/pgpool-ha-2.0 + mv /tmp/pgpool-ha-2.0 . + ( cd pgpool-ha-2.0 ; make distclean ; cd .. ) + tar cjf pgpool-ha-2.0.tar.bz2 --exclude-vcs pgpool-ha-2.0 + rm -rf pgpool-ha-2.0 diff --git a/pgpool-ha.spec b/pgpool-ha.spec index a2bf263..42e1a17 100644 --- a/pgpool-ha.spec +++ b/pgpool-ha.spec @@ -1,47 +1,46 @@ -Summary: Pgpool-HA uses heartbeat to keep pgpool from being a single point of failure +%global pgmajorversion 91 +%global pginstdir /usr/pgsql-9.1 +%global pgpoolinstdir /usr/pgpool-9.1 +%global sname pgpool-ha + +Summary: OCF style resource agent script for pgpool-II. Name: pgpool-ha -Version: 1.0.0 -Release: 2%{?dist} +Version: 2.0 +Release: 1%{?dist} License: BSD Vendor: PgPool Global Development Group Group: Applications/Databases -URL: http://pgpool.projects.PostgreSQL.org -Source0: http://pgfoundry.org/frs/download.php/1124/%{name}-%{version}.tar.bz2 +URL: http://www.pgpool.net +Source0: http://www.pgpool.net/download.php?f=%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: heartbeat >= 2.0 BuildArch: noarch %description -Pgpool-HA combines pgpool with heartbeat. Pgpool is a replication -server of PostgreSQL and makes reliability, but the pgpool server is -always a single point failure. Pgpool-HA uses heartbeat to eliminate -this. +OCF style resource agent script for pgpool-II. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{sname}-%{version} %build -%configure --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --libdir=%{_libdir} +./configure.sh --with-pgsql=%{pginstdir} --with-pgpool=%{pgpoolinstdir} +make %install -rm -rf %{buildroot} -cd src -make %{?smp_flags} install -install -d %{buildroot}%{_bindir} -install -d %{buildroot}%{_sysconfdir}/ha.d/resource.d/heartbeat/ -install -m 755 pgpool.monitor %{buildroot}%{_bindir}/pgpool.monitor -install -m 755 pgpool %{buildroot}%{_sysconfdir}/ha.d/resource.d/heartbeat/pgpool +make install %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{_bindir}/pgpool.monitor -%{_sysconfdir}/ha.d/resource.d/heartbeat/pgpool -%doc AUTHORS COPYING INSTALL README.ja ChangeLog doc README +/usr/lib/ocf/resource.d/heartbeat/pgpool +$docdir /usr/share/doc/pgpool-ha +%doc AUTHORS COPYING INSTALL README ChangeLog %changelog +* Mon Oct 15 2012 TAKATSUKA Haruka 2.0-1 +- rewite for pgpool-ha 2.0 + * Tue Oct 10 2006 Devrim GUNDUZ 1.0.0-2 - Some fixes to spec file -- 2.39.5