A new user interface for you! Read more...

File dba-pgpool-II-354.spec of Package dba-pgpool-II-354

%define real_name	pgpool-II
%define version         3.5.4
%define vers            354
%define prefix          /DBA/%{real_name}/%{version}


Name:		dba-%{real_name}-%{vers}
Summary:	Pgpool is a connection pooling/replication server for PostgreSQL 3.5.4
Version:	%{version}
Release:	1
License:	BSD
Group:		Productivity/Databases/Tools
URL:		http://pgpool.net/mediawiki/index.php/Downloads
Source:		http://www.pgpool.net/mediawiki/images/%{real_name}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	postgresql-devel pam-devel openssl-devel bison m4

Obsoletes:	postgresql-pgpool

#!BuildIgnore:  dba-postgresql-839 dba-postgresql-842 dba-postgresql-845 dba-postgresql-846 dba-postgresql-901 dba-postgresql-902 dba-postgresql-904
#!BuildIgnore:  dba-postgresql-905 dba-postgresql-910 dba-postgresql-911

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c
#!BuildIgnore:  dba-libxml2-290

BuildRequires:  libxml2-devel

%if 0%{?suse_version} >= 1100
BuildRequires:          -post-build-checks
%endif


%description
pgpool-II is a inherited project of pgpool (to classify from 
pgpool-II, it is sometimes called as pgpool-I). For those of 
you not familiar with pgpool-I, it is a multi-functional 
middle ware for PostgreSQL that features connection pooling, 
replication and load balancing functions. pgpool-I allows a 
user to connect at most two PostgreSQL servers for higher 
availability or for higher search performance compared to a 
single PostgreSQL server.

pgpool-II, on the other hand, allows multiple PostgreSQL 
servers (DB nodes) to be connected, which enables queries 
to be executed simultaneously on all servers. In other words, 
it enables "parallel query" processing. Also, pgpool-II can 
be started as pgpool-I by changing configuration parameters. 
pgpool-II that is executed in pgpool-I mode enables multiple 
DB nodes to be connected, which was not possible in pgpool-I. 


%prep
%setup -q -n %{real_name}-%{version}


%build
%{__mkdir_p} m4
%configure \
  --prefix=%prefix \
  --with-pgsql-includedir=%{_includedir}/pgsql \
  --with-pgsql-libdir=%{_libdir}/pgsql \
  --disable-static \
  --with-openssl \
  --with-pam \
  --disable-rpath

make %{?_smp_flags}


%install
rm -rf %{buildroot}
make %{?_smp_flags} DESTDIR=%{buildroot}%{prefix} install
install -d %{buildroot}%{prefix}/bin
install -d %{buildroot}%{prefix}/doc
install -d %{buildroot}%{prefix}/include
install -d %{buildroot}%{prefix}/lib
install -d %{buildroot}%{prefix}/man
install -d %{buildroot}%{prefix}/samples
install -d %{buildroot}%{prefix}/share
mv %{buildroot}/%{prefix}/etc/*.conf.sample* %{buildroot}%{prefix}/samples
mv %{buildroot}/%{prefix}/usr/bin/* %{buildroot}%{prefix}/bin
mv %{buildroot}/%{prefix}/usr/include/* %{buildroot}%{prefix}/include
mv %{buildroot}/%{prefix}/usr/lib*/* %{buildroot}%{prefix}/lib
mv %{buildroot}/%{prefix}/usr/share/man/* %{buildroot}%{prefix}/man
mv %{buildroot}/%{prefix}/usr/share/pgpool-II/* %{buildroot}%{prefix}/share
mv doc/* %{buildroot}%{prefix}/doc

# nuke libtool archive and static lib
rm -f %{buildroot}%{_libdir}/libpcp.{a,la}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%dir %{prefix}
%{prefix}/bin
%{prefix}/doc
%{prefix}/include
%{prefix}/lib
%{prefix}/man
%{prefix}/share
%{prefix}/samples


%changelog
* Wed Oct 12 2016 Christian Schmidt <christian.schmidt13@bertelsmann.de>
- initial package