]>
Commit | Line | Data |
---|---|---|
9a449b6e | 1 | # NOTES |
84d945f8 | 2 | # - build instructions: http://www.percona.com/doc/percona-xtrabackup/2.2/installation/compiling_xtrabackup.html |
9463cff2 | 3 | Summary: XtraBackup online backup for MySQL / InnoDB |
c01054b8 | 4 | Name: xtrabackup |
0cdce02e | 5 | Version: 2.4.12 |
62913e45 | 6 | Release: 2 |
c01054b8 ER |
7 | License: GPL v2 |
8 | Group: Applications/Databases | |
647d5174 | 9 | Source0: https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-%{version}/source/tarball/percona-%{name}-%{version}.tar.gz |
0cdce02e AM |
10 | # Source0-md5: c086206421a77f7c1ad28771a75cf396 |
11 | Source1: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2 | |
12 | # Source1-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87 | |
99c659be | 13 | Patch0: jsmn.patch |
9a449b6e | 14 | URL: http://www.percona.com/doc/percona-xtrabackup/ |
9463cff2 ER |
15 | BuildRequires: bash |
16 | BuildRequires: cmake >= 2.6 | |
1225d226 ER |
17 | BuildRequires: acl-devel |
18 | BuildRequires: curl-devel | |
19 | BuildRequires: expat-devel | |
99c659be | 20 | BuildRequires: jsmn-devel |
1225d226 | 21 | BuildRequires: gnupg |
9463cff2 | 22 | BuildRequires: libaio-devel |
1225d226 ER |
23 | BuildRequires: libarchive-devel |
24 | BuildRequires: bison | |
25 | BuildRequires: libev-devel | |
26 | BuildRequires: libgcrypt-devel | |
c01054b8 | 27 | BuildRequires: libstdc++-devel |
1225d226 | 28 | BuildRequires: libxml2-devel |
04dc1050 | 29 | BuildRequires: zlib-devel |
9463cff2 | 30 | BuildRequires: ncurses-devel >= 4.2 |
1225d226 ER |
31 | BuildRequires: python-modules |
32 | BuildRequires: readline-devel | |
33 | BuildRequires: xxd | |
34 | BuildRequires: sphinx-pdg | |
c01054b8 ER |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
84d945f8 ER |
38 | Percona XtraBackup is an open-source hot backup utility for |
39 | MySQL-based servers that doesn't lock your database during the backup. | |
40 | ||
41 | It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL | |
42 | 5.1, 5.5 and 5.6 servers, as well as Percona Server with XtraDB. | |
43 | ||
44 | Percona XtraBackup is a combination of the xtrabackup C program, and | |
45 | the innobackupex Perl script. The xtrabackup program copies and | |
46 | manipulates InnoDB and XtraDB data files, and the Perl script enables | |
47 | enhanced functionality, such as interacting with a running MySQL | |
48 | server and backing up MyISAM tables. | |
c01054b8 ER |
49 | |
50 | %prep | |
0cdce02e | 51 | %setup -q -n percona-%{name}-%{version} -a1 |
99c659be ER |
52 | %patch0 -p1 |
53 | ||
54 | # use system package | |
55 | mv storage/innobase/xtrabackup/src/jsmn . | |
04dc1050 | 56 | mv zlib zlib.dist |
9463cff2 | 57 | |
f64cba0a | 58 | %build |
84d945f8 ER |
59 | install -d build |
60 | cd build | |
9463cff2 | 61 | %cmake \ |
84d945f8 | 62 | -DBUILD_CONFIG=xtrabackup_release \ |
bf48565e ER |
63 | -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \ |
64 | -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \ | |
65 | -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \ | |
51282b4d | 66 | -DENABLE_DTRACE=OFF \ |
62913e45 | 67 | -DINSTALL_PLUGINDIR="%{_lib}/xtrabackup/plugins" \ |
8d516bea | 68 | -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ |
647d5174 ER |
69 | -DWITH_PIC=ON \ |
70 | -DWITH_READLINE=system \ | |
71 | -DWITH_ZLIB=system \ | |
99c659be | 72 | -DWITH_SSL=system \ |
0cdce02e | 73 | -DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)" \ |
84d945f8 | 74 | .. |
9463cff2 | 75 | |
f64cba0a | 76 | %{__make} |
9463cff2 | 77 | |
c01054b8 ER |
78 | %install |
79 | rm -rf $RPM_BUILD_ROOT | |
84d945f8 ER |
80 | %{__make} -C build install \ |
81 | DESTDIR=$RPM_BUILD_ROOT | |
82 | ||
e29b88d6 ER |
83 | # TODO: find fix in make or cmake rules |
84 | install -d $RPM_BUILD_ROOT%{_mandir} | |
85 | b=$(readlink -f %{_builddir}) | |
86 | mv $RPM_BUILD_ROOT$b/percona-xtrabackup-%{version}/build/man/man1 $RPM_BUILD_ROOT%{_mandir} | |
87 | ||
84d945f8 | 88 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/xtrabackup-test |
c01054b8 ER |
89 | |
90 | %clean | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
f64cba0a | 95 | %attr(755,root,root) %{_bindir}/innobackupex |
2a5d4da5 ER |
96 | %attr(755,root,root) %{_bindir}/xbcloud |
97 | %attr(755,root,root) %{_bindir}/xbcloud_osenv | |
84d945f8 | 98 | %attr(755,root,root) %{_bindir}/xbcrypt |
9463cff2 | 99 | %attr(755,root,root) %{_bindir}/xbstream |
84d945f8 | 100 | %attr(755,root,root) %{_bindir}/xtrabackup |
e29b88d6 ER |
101 | %{_mandir}/man1/innobackupex.1* |
102 | %{_mandir}/man1/xbcrypt.1* | |
103 | %{_mandir}/man1/xbstream.1* | |
104 | %{_mandir}/man1/xtrabackup.1* | |
62913e45 | 105 | %{_libdir}/%{name} |