2013-09-23 14:26:00 +00:00
|
|
|
# Template file for 'mariadb'
|
|
|
|
pkgname=mariadb
|
2015-01-29 09:05:21 +00:00
|
|
|
version=10.0.16
|
|
|
|
revision=1
|
2013-09-23 14:26:00 +00:00
|
|
|
build_style=cmake
|
|
|
|
configure_args="-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
|
2014-08-02 16:58:16 +00:00
|
|
|
-DINSTALL_PLUGINDIR=lib/mysql/plugin -DINSTALL_SCRIPTDIR=bin
|
2013-09-23 14:26:00 +00:00
|
|
|
-DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_DOCREADMEDIR=share/mysql
|
|
|
|
-DINSTALL_SUPPORTFILESDIR=share/mysql -DINSTALL_MYSQLSHAREDIR=share/mysql
|
|
|
|
-DINSTALL_DOCDIR=share/mysql/docs -DINSTALL_SHAREDIR=share/mysql
|
2014-07-18 13:17:46 +00:00
|
|
|
-DWITH_ZLIB=system -DWITH_PCRE=system -DWITH_READLINE=ON -DWITH_SSL=system
|
2013-09-23 14:26:00 +00:00
|
|
|
-DWITH_EMBEDDED_SERVER=ON -DWITH_ARCHIVE_STORAGE_ENGINE=1
|
|
|
|
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1
|
2014-07-18 13:17:46 +00:00
|
|
|
-DWITH_PARTITION_STORAGE_ENGINE=1 -DWITHOUT_TOKUDB=1
|
2013-09-23 14:26:00 +00:00
|
|
|
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
|
|
|
-DWITHOUT_PBXT_STORAGE_ENGINE=1 -DWITH_EXTRA_CHARSETS=complex
|
2015-01-29 09:05:21 +00:00
|
|
|
-DWITH_LIBWRAP=OFF -DSTACK_DIRECTION=1"
|
2014-03-29 16:47:53 +00:00
|
|
|
lib32disabled=yes
|
2013-12-02 09:00:51 +00:00
|
|
|
hostmakedepends="perl cmake bison ncurses-devel"
|
2015-01-22 11:09:32 +00:00
|
|
|
makedepends="zlib-devel ncurses-devel libressl-devel>=2.1.3 readline-devel pcre-devel"
|
2014-07-18 13:17:46 +00:00
|
|
|
depends="mariadb-client"
|
2014-01-01 15:10:11 +00:00
|
|
|
provides="mysql-${version}_${revision}"
|
|
|
|
replaces="mysql>=0"
|
|
|
|
conf_files="/etc/mysql/my.cnf"
|
2014-10-27 16:01:32 +00:00
|
|
|
build_options="systemd"
|
2014-01-01 15:10:11 +00:00
|
|
|
system_accounts="mysql"
|
2014-10-27 16:01:32 +00:00
|
|
|
mysql_homedir="/var/lib/mysql"
|
2013-09-23 14:26:00 +00:00
|
|
|
short_desc="Fast SQL database server, drop-in replacement for MySQL"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://mariadb.org/"
|
|
|
|
license="GPL-2"
|
2014-05-01 14:55:35 +00:00
|
|
|
distfiles="https://downloads.$pkgname.org/f/$pkgname-$version/source/$pkgname-$version.tar.gz"
|
2015-01-29 09:05:21 +00:00
|
|
|
checksum=44134a5f3e174e3e8443c1d07916af57f3ffadd4c8846338d41850fedfefcde4
|
2013-09-23 14:26:00 +00:00
|
|
|
|
|
|
|
pre_configure() {
|
|
|
|
# We need some host binaries before starting cross compilation.
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
# XXX still broken: jemalloc configure execs host bins.
|
|
|
|
CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake .
|
|
|
|
make comp_err comp_sql gen_lex_hash
|
|
|
|
mkdir bin.host
|
|
|
|
cp extra/comp_err bin.host
|
|
|
|
cp scripts/comp_sql bin.host
|
|
|
|
cp sql/gen_lex_hash bin.host
|
|
|
|
make clean
|
|
|
|
rm CMakeCache.txt
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_build() {
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
cp bin.host/comp_err ${wrksrc}/extra
|
|
|
|
cp bin.host/comp_sql ${wrksrc}/scripts
|
|
|
|
cp bin.host/gen_lex_hash ${wrksrc}/sql
|
|
|
|
export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql
|
|
|
|
fi
|
|
|
|
export LD_LIBRARY_PATH=${wrksrc}/build/storage/tokudb/ft-index/portability
|
|
|
|
}
|
|
|
|
post_install() {
|
|
|
|
# Remove unneeded stuff.
|
|
|
|
rm -rf ${DESTDIR}/usr/{sql-bench,mysql-test,data}
|
|
|
|
rm -f ${DESTDIR}/usr/share/man/man1/mysql-test-run.pl.1
|
|
|
|
|
|
|
|
# Configuration file.
|
|
|
|
install -Dm644 ${DESTDIR}/usr/share/mysql/my-medium.cnf ${DESTDIR}/etc/mysql/my.cnf
|
|
|
|
|
2014-10-27 16:01:32 +00:00
|
|
|
vsv mysqld
|
|
|
|
|
2013-09-23 14:26:00 +00:00
|
|
|
# systemd service.
|
2014-10-27 16:01:32 +00:00
|
|
|
if [ "$build_option_systemd" ]; then
|
|
|
|
vinstall ${FILESDIR}/mysqld.service 644 usr/lib/systemd/system
|
|
|
|
vinstall ${FILESDIR}/mysqld-post 755 usr/bin
|
|
|
|
vinstall ${FILESDIR}/mysqld.tmpfiles 644 usr/lib/tmpfiles.d mysqld.conf
|
|
|
|
fi
|
2013-09-23 14:26:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
libmariadbclient_package() {
|
|
|
|
short_desc+=" - client library"
|
|
|
|
provides="libmysqlclient-${version}_${revision}"
|
|
|
|
replaces="libmysqlclient>=0"
|
|
|
|
pkg_install() {
|
2014-03-29 16:59:27 +00:00
|
|
|
vmove "usr/lib/libmysqld.so.*"
|
2013-09-23 14:26:00 +00:00
|
|
|
vmove "usr/lib/libmysqlclient*.so.*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
libmariadbclient-devel_package() {
|
|
|
|
depends="libmariadbclient>=${version}_${revision}"
|
|
|
|
provides="libmysqlclient-devel-${version}_${revision}"
|
|
|
|
replaces="libmysqlclient-devel>=0"
|
|
|
|
short_desc+=" - client development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/mysql_config
|
|
|
|
vmove usr/share/man/man1/mysql_config.1
|
|
|
|
vmove usr/include
|
|
|
|
vmove "usr/lib/*.a"
|
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mariadb-client_package() {
|
|
|
|
depends="perl"
|
|
|
|
provides="mysql-client-${version}_${revision}"
|
|
|
|
replaces="mysql-client>=0"
|
2013-09-23 14:47:22 +00:00
|
|
|
short_desc+=" - client binaries"
|
2013-09-23 14:26:00 +00:00
|
|
|
pkg_install() {
|
|
|
|
for f in innochecksum innotop myisam_ftdump mysql mysql_client_test \
|
|
|
|
mysql_client_test_embedded mysqldumpslow mysqlbinlog \
|
|
|
|
mysql_find_rows mysql_fix_extensions mysql_waitpid mysqlaccess \
|
|
|
|
mysqladmin mysqlanalyze mysqlbug mysqlcheck mysqldump \
|
|
|
|
mysqlimport mysqloptimize mysqlrepair mysqlreport mysqlshow \
|
|
|
|
mysqlslap mysqltest_embedded mysqlmanager mysqltest \
|
|
|
|
mysqlhotcopy mysql_upgrade mysql_zap; do
|
|
|
|
if [ -f ${DESTDIR}/usr/bin/${f} ]; then
|
|
|
|
vmove usr/bin/${f}
|
|
|
|
elif [ -f ${DESTDIR}/usr/sbin/${f} ]; then
|
|
|
|
vmove usr/sbin/${f}
|
|
|
|
fi
|
|
|
|
if [ -f ${DESTDIR}/usr/share/man/man1/${f}.1 ]; then
|
|
|
|
vmove usr/share/man/man1/${f}.1
|
|
|
|
elif [ -f ${DESTDIR}/usr/share/man/man8/${f}.8 ]; then
|
|
|
|
vmove usr/share/man/man8/${f}.8
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|