File xtrabackup.spec of Package xtrabackup.openSUSE_13.1_Update
#
# spec file for package xtrabackup
#
# Copyright (c) 2014 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_55_VERSION 5.5.35
%define MYSQL_56_VERSION 5.6.15
Summary: Online backup for MySQL / InnoDB
License: GPL-2.0
Group: Productivity/Databases/Tools
Name: xtrabackup
Version: 2.1.7
Release: 0
Url: http://www.percona.com/software/percona-xtrabackup/
Source: percona-xtrabackup-%{version}-nodoc.tar.gz
Source2: mysql-%{MYSQL_55_VERSION}-nodoc.tar.gz
Source3: mysql-%{MYSQL_56_VERSION}-nodoc.tar.gz
Source4: xtrabackup-nodoc.sh
Patch0: percona-xtrabackup-2.1.x-nodoc.patch
Patch1: percona-xtrabackup-2.1.x-mysql-5.6.15-srv_buf_size.patch
Patch2: percona-xtrabackup-2.1.x-disable-default-version-check.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
Requires: qpress
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake >= 2.6.3
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libaio-devel
BuildRequires: libgcrypt-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: procps
BuildRequires: pwdutils
BuildRequires: readline-devel
BuildRequires: tcpd-devel
BuildRequires: zlib-devel
# some runtime perl requirements for innobackupex
Requires: perl(DBD::mysql)
Requires: perl(File::Basename)
Requires: perl(File::Copy)
Requires: perl(File::Find)
Requires: perl(File::Spec)
Requires: perl(File::Temp)
Requires: perl(FileHandle)
Requires: perl(Getopt::Long)
Requires: perl(Pod::Usage)
Requires: perl(Time::HiRes)
Requires: perl(strict)
%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 2 -a 3
# refuse to build from source tarballs with documentation due to license
%__find -maxdepth 1 -type d -iname "doc*" -print && exit 1
%__find mysql-%{MYSQL_55_VERSION} -maxdepth 1 -type d -iname "doc*" -print && exit 1
%__find mysql-%{MYSQL_56_VERSION} -maxdepth 1 -type d -iname "doc*" -print && exit 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
set -ue
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-exceptions"
export AUTO_DOWNLOAD=no
./utils/build.sh innodb55
%__cp src/xtrabackup_innodb55 ./xtrabackup_55
%__cp src/xbstream .
%__cp src/xbcrypt .
./utils/build.sh innodb56
%__cp src/xtrabackup_56 .
%install
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_datadir}
install -m 755 xtrabackup_55 %{buildroot}%{_bindir}
install -m 755 xtrabackup_56 %{buildroot}%{_bindir}
install -m 755 xbstream %{buildroot}%{_bindir}
install -m 755 xbcrypt %{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_55
%{_bindir}/xtrabackup_56
%{_bindir}/xbstream
%{_bindir}/xbcrypt
%doc COPYING
%changelog