2 # - build instructions: http://www.percona.com/doc/percona-xtrabackup/2.2/installation/compiling_xtrabackup.html
3 Summary: XtraBackup online backup for MySQL / InnoDB
8 Group: Applications/Databases
9 Source0: https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-%{version}/source/tarball/percona-%{name}-%{version}.tar.gz
10 # Source0-md5: eb2c006a75b5099665f04a54211fe8d5
12 URL: http://www.percona.com/doc/percona-xtrabackup/
14 BuildRequires: cmake >= 2.6
15 BuildRequires: acl-devel
16 BuildRequires: curl-devel
17 BuildRequires: expat-devel
18 BuildRequires: jsmn-devel
20 BuildRequires: libaio-devel
21 BuildRequires: libarchive-devel
23 BuildRequires: libev-devel
24 BuildRequires: libgcrypt-devel
25 BuildRequires: libstdc++-devel
26 BuildRequires: libxml2-devel
27 BuildRequires: zlib-devel
28 BuildRequires: ncurses-devel >= 4.2
29 BuildRequires: python-modules
30 BuildRequires: readline-devel
32 BuildRequires: sphinx-pdg
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Percona XtraBackup is an open-source hot backup utility for
37 MySQL-based servers that doesn't lock your database during the backup.
39 It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL
40 5.1, 5.5 and 5.6 servers, as well as Percona Server with XtraDB.
42 Percona XtraBackup is a combination of the xtrabackup C program, and
43 the innobackupex Perl script. The xtrabackup program copies and
44 manipulates InnoDB and XtraDB data files, and the Perl script enables
45 enhanced functionality, such as interacting with a running MySQL
46 server and backing up MyISAM tables.
49 %setup -q -n percona-%{name}-%{version}
53 mv storage/innobase/xtrabackup/src/jsmn .
60 -DBUILD_CONFIG=xtrabackup_release \
61 -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
62 -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
63 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \
65 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
67 -DWITH_READLINE=system \
75 rm -rf $RPM_BUILD_ROOT
76 %{__make} -C build install \
77 DESTDIR=$RPM_BUILD_ROOT
79 # TODO: find fix in make or cmake rules
80 install -d $RPM_BUILD_ROOT%{_mandir}
81 b=$(readlink -f %{_builddir})
82 mv $RPM_BUILD_ROOT$b/percona-xtrabackup-%{version}/build/man/man1 $RPM_BUILD_ROOT%{_mandir}
84 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/xtrabackup-test
87 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_bindir}/innobackupex
92 %attr(755,root,root) %{_bindir}/xbcloud
93 %attr(755,root,root) %{_bindir}/xbcloud_osenv
94 %attr(755,root,root) %{_bindir}/xbcrypt
95 %attr(755,root,root) %{_bindir}/xbstream
96 %attr(755,root,root) %{_bindir}/xtrabackup
97 %{_mandir}/man1/innobackupex.1*
98 %{_mandir}/man1/xbcrypt.1*
99 %{_mandir}/man1/xbstream.1*
100 %{_mandir}/man1/xtrabackup.1*