fix pgpool-ha.spec for pgpool-ha 2.0 , and fix relative files PGPOOL_HA_2_0
authorTAKATSUKA Haruka <harukat@sraoss.co.jp>
Mon, 15 Oct 2012 07:01:13 +0000 (16:01 +0900)
committerTAKATSUKA Haruka <harukat@sraoss.co.jp>
Mon, 15 Oct 2012 07:01:13 +0000 (16:01 +0900)
INSTALL
Makefile.in
pgpool-ha.spec

diff --git a/INSTALL b/INSTALL
index 743e5627a8f8753ea165076944c3821cebe68673..4bc67a1f92561bb236ce66bfaab602f98e66f24d 100644 (file)
--- 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:
index e46f6660d0629766e712a7a8b843a9d14aa1c5a9..168902c8523276f385abdc002362bb68327d7b75 100644 (file)
@@ -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
 
index a2bf26366033a09279099b5ec330478eea83fe2c..42e1a1705660a3c9e7de311371f66e60a35f3e73 100644 (file)
@@ -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 <harukat@sraoss.co.jp> 2.0-1
+- rewite for pgpool-ha 2.0
+
 * Tue Oct 10 2006 Devrim GUNDUZ <devrim@CommandPrompt.com> 1.0.0-2
 - Some fixes to spec file