File xtrabackup.spec of Package xtrabackup

# spec file for package xtrabackup
# Copyright (c) 2018 SUSE LINUX 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

Name:           xtrabackup
Version:        2.4.10
Release:        0
Summary:        Online backup for MySQL / InnoDB
License:        GPL-2.0-only
Group:          Productivity/Archiving/Backup
# stripped source tarball generated from URL below using
Source:         percona-xtrabackup-%{version}-nodoc.tar.xz
Patch3:         percona-xtrabackup-2.2.9-nodoc.patch
Patch4:         percona-xtrabackup-2.3.3-disable-version-check.patch
Patch5:         percona-xtrabackup-2.3.2-unbundle-jsnm.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  cmake >= 2.6.3
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  jsmn-devel
BuildRequires:  libaio-devel
BuildRequires:  libcurl-devel
BuildRequires:  libev-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libtool
BuildRequires:  ncurses-devel
BuildRequires:  openssl-devel
BuildRequires:  procps
BuildRequires:  pwdutils
BuildRequires:  readline-devel
BuildRequires:  tcpd-devel
BuildRequires:  xz
BuildRequires:  zlib-devel
Requires:       rsync
Recommends:     qpress
# This is to ease migration from Percona's generic packages
Provides:       percona-xtrabackup = %{version}
Obsoletes:      percona-xtrabackup < %{version}

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.

%package test
Summary:        Test suite for Percona XtraBackup
Group:          Productivity/Archiving/Backup
Requires:       %{_bindir}/mysql
Requires:       %{name} = %{version}

%description test
This package contains the test suite for Percona XtraBackup %{version}

%setup -q -n percona-xtrabackup-%{version} -a 2
rm -rf storage/innobase/xtrabackup/src/jsmn

%patch3 -p1
%patch4 -p1
%patch5 -p1

%cmake \
    -DCMAKE_C_FLAGS:STRING="%{optflags} -DXTRABACKUP_VERSION=\\\"%{version}\\\" -DDBUG_OFF" \
    -DCMAKE_CXX_FLAGS:STRING="%{optflags} -DXTRABACKUP_VERSION=\\\"%{version}\\\" -DDBUG_OFF" \
    -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
    -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
    -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \
    -DBUILD_CONFIG=xtrabackup_release -DWITH_SSL=system \
    -DINSTALL_MYSQLTESTDIR=%{_datadir}/percona-xtrabackup-test \
    -DMYSQL_UNIX_ADDR=%{_rundir}/mysql/mysql.sock \

make %{?_smp_mflags}


%license COPYING

%files test