2016-02-24 14:29:44 +00:00
|
|
|
# $Id$
|
|
|
|
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - drop valgrind makedepend, bug requiring it has been fixed
|
2016-05-20 18:20:18 +00:00
|
|
|
# - drop numactl makedepend, don't build with NUMA
|
2016-03-22 00:17:14 +00:00
|
|
|
# - disable epoll on aarch64
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
pkgbase=percona-server
|
|
|
|
pkgname=('libperconaserverclient' 'percona-server-clients' 'percona-server')
|
2018-02-26 13:35:07 +00:00
|
|
|
pkgver=5.7.21_20
|
2016-02-24 14:29:44 +00:00
|
|
|
_boost_ver=1.59.0
|
|
|
|
_pkgver=${pkgver/_/-}
|
|
|
|
_myver=${pkgver/_rel*}
|
2017-12-27 13:47:55 +00:00
|
|
|
pkgrel=1
|
|
|
|
arch=('x86_64')
|
2017-08-02 12:48:56 +00:00
|
|
|
makedepends=('cmake' 'zlib' 'lz4' 'zstd' 'libaio' 'systemd-tools' 'pam' 'jemalloc' 'openssl')
|
|
|
|
license=('GPL')
|
2016-11-09 13:29:31 +00:00
|
|
|
url="https://www.percona.com/software/mysql-database/percona-server"
|
|
|
|
source=("https://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-$_pkgver/source/tarball/percona-server-$_pkgver.tar.gz"
|
2017-12-27 13:47:55 +00:00
|
|
|
"http://jenkins.percona.com/downloads/boost/boost_${_boost_ver//./_}.tar.gz"
|
2016-02-24 14:29:44 +00:00
|
|
|
'my.cnf'
|
2017-05-30 17:58:58 +00:00
|
|
|
'mysql-user.conf'
|
2017-12-27 13:47:55 +00:00
|
|
|
'rocksdb-systemlibs.patch')
|
2018-02-26 13:35:07 +00:00
|
|
|
sha256sums=('842785e9b73c606be00ea74f568615d3427362fbeed5c136d8f509f03c9d43a6'
|
2016-11-09 13:29:31 +00:00
|
|
|
'47f11c8844e579d02691a607fbd32540104a9ac7a2534a8ddaef50daf502baac'
|
|
|
|
'ae451839c368f0db25a63bb0a6a890194897a8e74818bd4245140933c29e5f83'
|
2017-05-30 17:58:58 +00:00
|
|
|
'e638a2657085f15b6728f43c1fd6aa551b27608fbf6b435e33afd3606a0cfb0e'
|
2018-02-26 13:35:07 +00:00
|
|
|
'fcc3bea0982cda6cc35637d448a46924eccdfeb4c4da0634a26c9d190cf50fe4')
|
2017-03-27 12:34:54 +00:00
|
|
|
|
2016-02-24 14:29:44 +00:00
|
|
|
prepare() {
|
|
|
|
cd $pkgbase-$_pkgver
|
|
|
|
rm -v sql/sql_yacc.{cc,h}
|
|
|
|
|
2017-05-30 17:58:58 +00:00
|
|
|
sed 's/${fullhostname}/"archbuild"/' -i storage/tokudb/PerconaFT/cmake_modules/TokuSetupCTest.cmake
|
|
|
|
sed 's/-Werror//g' -i \
|
2017-08-02 12:48:56 +00:00
|
|
|
storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake \
|
|
|
|
plugin/tokudb-backup-plugin/Percona-TokuBackup/backup/CMakeLists.txt
|
2017-05-30 17:58:58 +00:00
|
|
|
|
2017-12-27 13:47:55 +00:00
|
|
|
patch -p1 -i "$srcdir"/rocksdb-systemlibs.patch
|
2016-02-24 14:29:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
rm -rf build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2016-07-09 16:43:41 +00:00
|
|
|
[[ $CARCH == "aarch64" ]] && CONFIG="-DHAVE_SYS_EPOLL_H=0"
|
2016-03-22 00:17:14 +00:00
|
|
|
|
2016-02-24 14:29:44 +00:00
|
|
|
cmake ../$pkgbase-$_pkgver \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DBUILD_CONFIG=mysql_release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DSYSCONFDIR=/etc/mysql \
|
|
|
|
-DMYSQL_DATADIR=/var/lib/mysql \
|
|
|
|
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
|
|
|
|
-DDEFAULT_CHARSET=utf8 \
|
|
|
|
-DDEFAULT_COLLATION=utf8_general_ci \
|
|
|
|
-DENABLED_LOCAL_INFILE=ON \
|
|
|
|
-DINSTALL_INFODIR=share/mysql/docs \
|
|
|
|
-DINSTALL_MANDIR=share/man \
|
|
|
|
-DINSTALL_PLUGINDIR=lib/mysql/plugin \
|
|
|
|
-DINSTALL_SCRIPTDIR=bin \
|
|
|
|
-DINSTALL_INCLUDEDIR=include/perconaserver \
|
|
|
|
-DINSTALL_DOCREADMEDIR=share/mysql \
|
|
|
|
-DINSTALL_SUPPORTFILESDIR=share/mysql \
|
|
|
|
-DINSTALL_MYSQLSHAREDIR=share/mysql \
|
|
|
|
-DINSTALL_DOCDIR=share/mysql/docs \
|
|
|
|
-DINSTALL_SHAREDIR=share/mysql \
|
|
|
|
-DWITH_ZLIB=system \
|
2017-08-02 12:48:56 +00:00
|
|
|
-DWITH_LZ4=system \
|
|
|
|
-DWITH_SSL=system \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_LIBWRAP=OFF \
|
2016-08-25 18:01:02 +00:00
|
|
|
-DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_UNIT_TESTS=OFF \
|
|
|
|
-DWITH_PAM=ON \
|
|
|
|
-DWITH_EXTRA_CHARSETS=complex \
|
|
|
|
-DWITH_EMBEDDED_SERVER=ON \
|
2016-08-25 18:01:02 +00:00
|
|
|
-DWITH_EMBEDDED_SHARED_LIBRARY=ON \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_INNODB_MEMCACHED=ON \
|
|
|
|
-DWITH_INNOBASE_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_PARTITION_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_ARCHIVE_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
|
|
|
|
-DWITH_FEDERATED_STORAGE_ENGINE=OFF \
|
|
|
|
-DWITH_EXAMPLE_STORAGE_ENGINE=OFF \
|
2017-08-02 12:48:56 +00:00
|
|
|
-DWITH_ROCKSDB=1 \
|
2016-08-25 18:01:02 +00:00
|
|
|
-DWITH_SYSTEMD=1 \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DCMAKE_C_FLAGS="-fPIC $CFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks" \
|
2016-05-20 18:20:18 +00:00
|
|
|
-DCMAKE_CXX_FLAGS="-fPIC $CXXFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-delete-null-pointer-checks -Wno-error=nonnull-compare -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-maybe-uninitialized" \
|
2016-02-24 14:29:44 +00:00
|
|
|
-DWITH_MYSQLD_LDFLAGS="-pie ${LDFLAGS},-z,now" \
|
2016-03-22 00:17:14 +00:00
|
|
|
-DWITH_BOOST="../boost_${_boost_ver//./_}" \
|
2017-08-02 12:48:56 +00:00
|
|
|
-DWITH_NUMA=OFF \
|
2016-03-22 00:17:14 +00:00
|
|
|
${CONFIG}
|
2016-02-24 14:29:44 +00:00
|
|
|
|
2017-08-02 12:48:56 +00:00
|
|
|
|
2016-02-24 14:29:44 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package_libperconaserverclient() {
|
|
|
|
pkgdesc='Percona Server client libraries'
|
2017-08-02 12:48:56 +00:00
|
|
|
depends=('zlib' 'openssl')
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
cd build
|
|
|
|
for dir in include libmysql libmysqld libservices; do
|
|
|
|
make -C $dir DESTDIR="$pkgdir" install
|
|
|
|
done
|
|
|
|
|
2017-08-02 12:48:56 +00:00
|
|
|
# Conflicting files with libmariadbclient
|
2017-09-02 12:43:49 +00:00
|
|
|
rm -rf "$pkgdir"/usr/lib/{libmysql*,mysql}
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/perconaserver_config
|
|
|
|
install -d "$pkgdir"/usr/share/man/man1
|
|
|
|
install -m644 "$srcdir"/$pkgbase-$_pkgver/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/perconaserver_config.1
|
|
|
|
}
|
|
|
|
|
|
|
|
package_percona-server-clients() {
|
|
|
|
pkgdesc='Percona Server client tools'
|
2017-08-02 12:48:56 +00:00
|
|
|
depends=('libperconaserverclient' 'zlib' 'lz4' 'jemalloc' 'readline')
|
2016-02-24 14:29:44 +00:00
|
|
|
conflicts=('mysql-clients')
|
|
|
|
provides=("mysql-clients=$_myver" "mariadb-clients=$_myver")
|
|
|
|
|
|
|
|
cd build
|
|
|
|
make -C client DESTDIR="$pkgdir" install
|
|
|
|
|
|
|
|
# install man pages
|
|
|
|
install -d "$pkgdir"/usr/share/man/man1
|
2016-03-06 16:32:14 +00:00
|
|
|
for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqlpump; do
|
2016-02-24 14:29:44 +00:00
|
|
|
install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
|
|
|
|
done
|
|
|
|
|
|
|
|
# provided by percona-server
|
|
|
|
rm "$pkgdir"/usr/bin/mysql{_plugin,_upgrade,binlog,test,_config_editor,_install_db,_secure_installation,_ssl_rsa_setup}
|
|
|
|
}
|
|
|
|
|
|
|
|
package_percona-server() {
|
|
|
|
pkgdesc='Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and TokuDB storage engine'
|
|
|
|
backup=('etc/mysql/my.cnf')
|
2017-08-06 22:48:33 +00:00
|
|
|
depends=('libaio' 'systemd-tools' 'pam' 'jemalloc' 'lz4' 'zstd' 'openssl')
|
2016-02-24 14:29:44 +00:00
|
|
|
optdepends=('perl-dbd-mysql')
|
|
|
|
conflicts=('mysql')
|
|
|
|
provides=("mysql=$_myver" "mariadb=$_myver")
|
|
|
|
options=('emptydirs')
|
|
|
|
|
|
|
|
cd build
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
|
|
|
|
install -Dm644 ../my.cnf "$pkgdir"/etc/mysql/my.cnf
|
|
|
|
install -Dm644 ../mysql-user.conf "$pkgdir"/usr/lib/sysusers.d/mysql.conf
|
|
|
|
|
2017-08-02 12:48:56 +00:00
|
|
|
cd "$pkgdir"
|
|
|
|
mv usr/usr/lib/* usr/lib
|
|
|
|
rm -rf usr/usr
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
# Move documentation
|
|
|
|
install -dm755 usr/share/doc
|
|
|
|
mv usr/share/mysql/docs usr/share/doc/$pkgname
|
2016-03-21 12:15:44 +00:00
|
|
|
mv usr/share/mysql/{COPYING,README.MySQL} usr/share/doc/$pkgname/
|
2016-02-24 14:29:44 +00:00
|
|
|
|
|
|
|
if [ -f usr/PATENTS ]; then
|
|
|
|
mv usr/{PATENTS,README.md} usr/share/doc/$pkgname/
|
|
|
|
rm usr/COPYING.*
|
|
|
|
fi
|
|
|
|
|
|
|
|
# provided by libperconaserverclient
|
|
|
|
rm usr/bin/mysql_config
|
|
|
|
rm usr/lib/lib{mysql,perconaserver}*
|
|
|
|
rm -r usr/include/
|
|
|
|
rm usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
|
|
|
|
|
|
|
|
# provided by percona-server-clients
|
|
|
|
rm usr/bin/mysql{,admin,check,dump,import,show,slap,pump}
|
|
|
|
rm usr/share/man/man1/mysql{,admin,check,dump,import,show,slap,pump}.1
|
|
|
|
|
|
|
|
# deprecated/unused
|
|
|
|
rm usr/bin/replace
|
|
|
|
rm usr/share/man/man1/replace.1
|
|
|
|
|
|
|
|
# not needed
|
|
|
|
rm -r usr/mysql-test
|
|
|
|
rm usr/share/man/man1/mysql-test-run.pl.1
|
|
|
|
}
|