URL: http://www.pgppol.net/
Source0: pgpool-II-%{version}.tar.gz
Source1: pgpool.init
-Source2: pgpool.sysconfig
+Source2: pgpool_rhel6.sysconfig
%if %{systemd_enabled}
Source3: pgpool.service
%endif
+Source4: pgpool_rhel7.sysconfig
Patch1: pgpool-II-head.patch
%if %{pg_version} >=94 && %{rhel} >= 7
Patch2: pgpool_socket_dir.patch
%endif
install -d %{buildroot}%{_sysconfdir}/sysconfig
-install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool
+%if 0%{rhel} && 0%{rhel} <= 6
+ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool
+%else
+ install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/pgpool
+%endif
# nuke libtool archive and static lib
rm -f %{buildroot}%{_libdir}/libpcp.{a,la}