]> git.pld-linux.org Git - packages/xtrabackup.git/blob - xtrabackup.spec
b765b67f1c58ece41558173f3df8d5b5915d089d
[packages/xtrabackup.git] / xtrabackup.spec
1 # NOTES
2 # - build instructions: http://www.percona.com/doc/percona-xtrabackup/2.2/installation/compiling_xtrabackup.html
3 Summary:        XtraBackup online backup for MySQL / InnoDB
4 Name:           xtrabackup
5 Version:        2.3.3
6 Release:        3
7 License:        GPL v2
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
11 Patch0: jsmn.patch
12 URL:            http://www.percona.com/doc/percona-xtrabackup/
13 BuildRequires:  bash
14 BuildRequires:  cmake >= 2.6
15 BuildRequires:  acl-devel
16 BuildRequires:  curl-devel
17 BuildRequires:  expat-devel
18 BuildRequires:  jsmn-devel
19 BuildRequires:  gnupg
20 BuildRequires:  libaio-devel
21 BuildRequires:  libarchive-devel
22 BuildRequires:  bison
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
31 BuildRequires:  xxd
32 BuildRequires:  sphinx-pdg
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Percona XtraBackup is an open-source hot backup utility for
37 MySQL-based servers that doesn't lock your database during the backup.
38
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.
41
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.
47
48 %prep
49 %setup -q -n percona-%{name}-%{version}
50 %patch0 -p1
51
52 # use system package
53 mv storage/innobase/xtrabackup/src/jsmn .
54 mv zlib zlib.dist
55
56 %build
57 install -d build
58 cd build
59 %cmake \
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" \
64         -DENABLE_DTRACE=OFF \
65         -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
66         -DWITH_PIC=ON \
67         -DWITH_READLINE=system \
68         -DWITH_ZLIB=system \
69         -DWITH_SSL=system \
70         ..
71
72 %{__make}
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 %{__make} -C build install \
77         DESTDIR=$RPM_BUILD_ROOT
78
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}
83
84 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/xtrabackup-test
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
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*
This page took 0.034277 seconds and 2 git commands to generate.