2 # - build instructions: http://www.percona.com/doc/percona-xtrabackup/2.2/installation/compiling_xtrabackup.html
4 # - system zlib (seems unmodified)
5 # - BR deps (for libarchive, mysql builds)
6 Summary: XtraBackup online backup for MySQL / InnoDB
11 Group: Applications/Databases
12 Source0: https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-%{version}/source/tarball/percona-%{name}-%{version}.tar.gz
13 # Source0-md5: aff6e19b0b1069ac270e2d4d80b6e435
14 URL: http://www.percona.com/doc/percona-xtrabackup/
16 BuildRequires: cmake >= 2.6
17 BuildRequires: libaio-devel
18 #BuildRequires: libarchive-devel
19 BuildRequires: libstdc++-devel
20 BuildRequires: ncurses-devel >= 4.2
21 #BuildRequires: zlib-devel
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Percona XtraBackup is an open-source hot backup utility for
26 MySQL-based servers that doesn't lock your database during the backup.
28 It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL
29 5.1, 5.5 and 5.6 servers, as well as Percona Server with XtraDB.
31 Percona XtraBackup is a combination of the xtrabackup C program, and
32 the innobackupex Perl script. The xtrabackup program copies and
33 manipulates InnoDB and XtraDB data files, and the Perl script enables
34 enhanced functionality, such as interacting with a running MySQL
35 server and backing up MyISAM tables.
38 %setup -q -n percona-%{name}-%{version}
44 -DBUILD_CONFIG=xtrabackup_release \
45 -DCMAKE_C_FLAGS_RELEASE="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
46 -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
48 -DWITH_EDITLINE=system \
50 -DWITH_READLINE=system \
57 rm -rf $RPM_BUILD_ROOT
58 %{__make} -C build install \
59 DESTDIR=$RPM_BUILD_ROOT
61 # TODO: find fix in make or cmake rules
62 install -d $RPM_BUILD_ROOT%{_mandir}
63 b=$(readlink -f %{_builddir})
64 mv $RPM_BUILD_ROOT$b/percona-xtrabackup-%{version}/build/man/man1 $RPM_BUILD_ROOT%{_mandir}
66 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/xtrabackup-test
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %attr(755,root,root) %{_bindir}/innobackupex
74 %attr(755,root,root) %{_bindir}/xbcrypt
75 %attr(755,root,root) %{_bindir}/xbstream
76 %attr(755,root,root) %{_bindir}/xtrabackup
77 %{_mandir}/man1/innobackupex.1*
78 %{_mandir}/man1/xbcrypt.1*
79 %{_mandir}/man1/xbstream.1*
80 %{_mandir}/man1/xtrabackup.1*