File xtrabackup.spec of Package xtrabackup
#
# spec file for package xtrabackup
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define MYSQL_51_VERSION 5.1.59
%define MYSQL_55_VERSION 5.5.17
Summary: Online backup for MySQL / InnoDB
License: GPL-2.0
Group: Productivity/Databases/Tools
Name: xtrabackup
Version: 2.0.4
Release: 0
Url: http://www.percona.com/software/percona-xtrabackup/
Source: percona-xtrabackup-%{version}-nodoc.tar.gz
Source1: mysql-%{MYSQL_51_VERSION}-nodoc.tar.gz
Source2: mysql-%{MYSQL_55_VERSION}-nodoc.tar.gz
Source3: xtrabackup-nodoc.sh
Patch0: percona-xtrabackup-2.0.2-nodoc.patch
Patch1: mysql-5.1.59-nodoc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# This is to ease migration from Percona's generic packages
Provides: percona-xtrabackup = %{version}
Obsoletes: percona-xtrabackup < %{version}
#
Requires: mysql
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake >= 2.6.3
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libaio-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: procps
BuildRequires: pwdutils
BuildRequires: readline-devel
BuildRequires: tcpd-devel
BuildRequires: zlib-devel
%description
Percona XtraBackup is an online (non-blocking) backup solution for InnoDB
engines. It features uninterrupted transaction processing during backups for
InnoDB, but can also backup MyISAM tables.
%prep
%setup -q -n percona-xtrabackup-%{version} -a 1 -a 2
# refuse to build from source tarballs with documentation due to license
%__find -maxdepth 1 -type d -iname "doc*" -print && exit 1
%__find mysql-%{MYSQL_51_VERSION} -maxdepth 1 -type d -iname "doc*" -print && exit 1
%__find mysql-%{MYSQL_55_VERSION} -maxdepth 1 -type d -iname "doc*" -print && exit 1
%patch0
%patch1
%build
set -ue
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-exceptions"
export AUTO_DOWNLOAD=no
./utils/build.sh 5.1
%__cp src/xtrabackup_51 .
%__cp src/xbstream .
./utils/build.sh innodb55
%__cp src/xtrabackup_innodb55 .
%install
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_datadir}
install -m 755 xtrabackup_51 %{buildroot}%{_bindir}
install -m 755 xtrabackup_innodb55 %{buildroot}%{_bindir}
install -m 755 xbstream %{buildroot}%{_bindir}
install -m 755 innobackupex %{buildroot}%{_bindir}
ln -s innobackupex %{buildroot}%{_bindir}/innobackupex-1.5.1
%files
%defattr(-,root,root)
%{_bindir}/innobackupex
%{_bindir}/innobackupex-1.5.1
%{_bindir}/xtrabackup_51
%{_bindir}/xtrabackup_innodb55
%{_bindir}/xbstream
%doc COPYING
%changelog