%define realname Bucardo
Name: bucardo
Version: 4.5.0
Release: 12%{?dist}
Summary: Postgres replication system for both multi-master and multi-slave operations
Group: Applications/Databases
# The README file says `same as Perl', however, I don't think it's
# what they meant. Reported as github#95.
License: BSD
URL: http://bucardo.org/
Source0: http://bucardo.org/downloads/Bucardo-%{version}.tar.gz
Source1: master-master-replication-example.txt
BuildArch: noarch
BuildRequires: postgresql-plperl
# Build
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.68
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Runtime
BuildRequires: perl(Config)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(DBD::Pg) >= 2.0
BuildRequires: perl(DBI) >= 1.51
BuildRequires: perl(DBIx::Safe)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(Net::SMTP)
BuildRequires: perl(POSIX)
BuildRequires: perl(sigtrap)
BuildRequires: perl(Sys::Hostname)
BuildRequires: perl(Sys::Syslog)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(vars)
# Tests only
BuildRequires: perl(base)
BuildRequires: perl(Cwd)
BuildRequires: perl(Exporter)
BuildRequires: perl(lib)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
Requires: postgresql-plperl
%description
Bucardo is an asynchronous PostgreSQL replication system, allowing for both
multi-master and multi-slave operations.It was developed at Backcountry.com
primarily by Greg Sabino Mullane of End Point Corporation.
%prep
%setup -q -n %{realname}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
%install
make pure_install DESTDIR=%{buildroot} DESTINSTALLVENDORSHARE=%{buildroot}/%{_datadir}/%{name}
#removing packlist is required for building on fedora-epel
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
sed -i -e '1d;2i#!%{__perl}' %{name}_ctl
rm -f %{buildroot}/%{_bindir}/%{name}_ctl
install -Dp -m755 bucardo_ctl %{buildroot}/%{_sbindir}/%{name}_ctl
install -Dp -m644 %{name}.schema %{buildroot}/%{_datadir}/%{name}/%{name}.schema
mkdir -p %{buildroot}/%{_localstatedir}/run/%{name}
install -Dp -m644 %{SOURCE1} .
%{_fixperms} %{buildroot}/
%check
# This test runs forever, it'd be nice to figure out why,
# fix it and re-enable it. For now, run the rest of the
# test suite at least.
rm -f t/15-star.t
make test
%files
%license LICENSE
%doc *.html Changes INSTALL README TODO
%doc master-master-replication-example.txt
%{perl_vendorlib}/*
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_sbindir}/%{name}_ctl
%{_datadir}/%{name}
%dir %{_localstatedir}/run/%{name}
%changelog
* Wed Sep 23 2015 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.5.0-12
- change spec to make it buildable under fedora-epel
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 4.5.0-10
- Perl 5.22 rebuild
* Mon May 25 2015 Petr Ĺ abata <contyk@redhat.com> - 4.5.0-9
- Fix the FTBFS issue (#1158368)
- Install the missing database schema
- Clean and modernize the spec file
- Drop the unused signature file
- Fix the dep list
- Install the LICENSE file with %%license
- Enable test suite
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 4.5.0-8
- Perl 5.20 rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jul 25 2013 Petr Pisar <ppisar@redhat.com> - 4.5.0-5
- Perl 5.18 rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jul 13 2012 Petr Pisar <ppisar@redhat.com> - 4.5.0-2
- Depend on perl ABI as each perl package
* Thu Jul 12 2012 Itamar <itamar@ispbrasil.com.br> - 4.5.0-1
- new version 4.5.0
* Fri Jan 13 2012 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.8-1
- new version 4.4.8
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Nov 09 2011 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.7-1
- new version 4.4.7
* Mon Jul 11 2011 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.6-1
- new version 4.4.6
* Sun Jun 19 2011 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.5-1
- New version 4.4.5 fix truncate bug
* Sun May 15 2011 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.4-1
- New version 4.4.4 fix backslash bug
* Thu Apr 21 2011 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.3-1
- New version 4.4.3
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Nov 14 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.0-2
- Removed some duplicated modules, changed Mail::Sendmail to Net::SMTP.
* Sat Nov 14 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 4.4.0-1
- rebuild with latest version
* Mon Oct 12 2009 David Fraser <davidf@sjsoft.com> - 4.3.0-1
- Rebuild with latest version
* Sun Feb 01 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 3.0.9-2
- Don't strip tarball (removing DBIx-Safe and Test-Dynamic)
* Thu Jan 29 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 3.0.9-1
- Initial RPM release