PKGBUILDs/community/xtrabackup/PKGBUILD
2019-05-20 12:38:12 +00:00

51 lines
1.9 KiB
Bash

# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove dependency on numactl
pkgname=xtrabackup
pkgver=8.0.6
_boost_ver=1.68.0
pkgrel=1
pkgdesc='Non-blocking backup tool for MySQL'
arch=('x86_64')
url='https://www.percona.com/software/mysql-database/percona-xtrabackup'
license=('GPL')
depends=('libaio' 'libev' 'libgcrypt' 'curl' 'perl-dbd-mysql')
makedepends=('cmake' 'python-sphinx' 'zlib' 'vim' 'libedit' 'libevent' 'protobuf' 're2')
optdepends=('qpress: for compressed backups')
source=(https://www.percona.com/downloads/Percona-XtraBackup-LATEST/Percona-XtraBackup-${pkgver%.*}-${pkgver##*.}/source/tarball/percona-xtrabackup-$pkgver.tar.gz
http://sourceforge.net/projects/boost/files/boost/${_boost_ver}/boost_${_boost_ver//./_}.tar.gz)
sha256sums=('3d748d646654c9692d9e3a8402935303e5c83d82f493066b7eda4d7c47d902f4'
'da3411ea45622579d419bfda66f45cd0f8c32a181d84adfa936f5688388995cf')
build() {
mkdir build
cd build
cmake -DBUILD_CONFIG=xtrabackup_release \
-DCMAKE_BUILD_TYPE=Release \
-DMYSQL_DATADIR=/var/lib/mysql \
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
-DWITH_LIBEVENT=system \
-DWITH_SSL=system \
-DWITH_EDITLINE=system \
-DWITH_LZ4=system \
-DWITH_LZMA=bundled \
-DWITH_PROTOBUF=system \
-DWITH_RE2=system \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_PLUGINDIR="/usr/lib/xtrabackup/plugin" \
-DINSTALL_MANDIR="/usr/share/man" \
-DINSTALL_STATIC_LIBRARIES=OFF \
-DWITH_BOOST="../boost_${_boost_ver//./_}" \
../percona-xtrabackup-$pkgver
make
}
package() {
cd build
make DESTDIR="$pkgdir" install
cd "$pkgdir"
rm -rf usr/xtrabackup-test usr/lib/xtrabackup/plugin/debug
}