2010-03-04 13:50:13 +01:00
|
|
|
# Template file for 'mysql'
|
|
|
|
pkgname=mysql
|
2014-10-31 21:19:12 +01:00
|
|
|
version=5.6.21
|
|
|
|
revision=1
|
2013-07-25 08:55:19 +02: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 18:45:26 +02:00
|
|
|
-DINSTALL_PLUGINDIR=lib/mysql/plugin -DINSTALL_SCRIPTDIR=bin
|
2013-07-25 08:55:19 +02: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
|
|
|
|
-DWITH_ZLIB=system -DWITH_SSL=system -DWITH_LIBWRAP=OFF
|
|
|
|
-DWITH_EXTRA_CHARSETS=complex -DWITH_EMBEDDED_SERVER=ON
|
|
|
|
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1
|
|
|
|
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1
|
|
|
|
-DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
2014-07-15 19:22:00 +02:00
|
|
|
-DSTACK_DIRECTION=1 -DHAVE_LLVM_LIBCPP_EXITCODE=0"
|
2014-04-02 16:33:52 +02:00
|
|
|
lib32disabled=yes
|
2013-09-23 17:13:46 +02:00
|
|
|
hostmakedepends="perl cmake bison ncurses-devel"
|
2014-07-15 19:22:00 +02:00
|
|
|
makedepends="zlib-devel ncurses-devel libressl-devel readline-devel"
|
2014-10-13 17:48:44 +02:00
|
|
|
depends="mysql-client"
|
2014-01-01 16:10:11 +01:00
|
|
|
conf_files="/etc/mysql/my.cnf"
|
|
|
|
system_accounts="mysql"
|
2014-10-13 17:48:44 +02:00
|
|
|
mysql_homedir="/var/lib/mysql"
|
2010-03-04 13:50:13 +01:00
|
|
|
short_desc="The world's most popular open source database"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2012-08-06 07:21:26 +02:00
|
|
|
homepage="https://www.mysql.com/products/community/"
|
|
|
|
license="GPL-2"
|
2014-08-02 18:45:26 +02:00
|
|
|
distfiles="https://downloads.skysql.com/archives/mysql-${version%.*}/mysql-${version}.tar.gz"
|
2014-10-31 21:19:12 +01:00
|
|
|
checksum=ea4daf6a8f4b1a9c62e416249a08fbdcbf686667d738004ef82044def96feb7c
|
2010-03-04 13:50:13 +01:00
|
|
|
|
2013-07-25 08:55:19 +02:00
|
|
|
pre_configure() {
|
2014-07-15 19:22:00 +02:00
|
|
|
# libressl major detection.
|
|
|
|
sed -i '/OPENSSL_MAJOR_VERSION/s/1/2/' cmake/ssl.cmake
|
|
|
|
|
2013-07-25 08:55:19 +02:00
|
|
|
# We need some host binaries before starting cross compilation.
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake .
|
|
|
|
make comp_err comp_sql gen_lex_hash gen_pfs_lex_token
|
|
|
|
mkdir bin.host
|
|
|
|
cp extra/comp_err bin.host
|
|
|
|
cp scripts/comp_sql bin.host
|
|
|
|
cp sql/gen_lex_hash bin.host
|
|
|
|
cp storage/perfschema/gen_pfs_lex_token bin.host
|
|
|
|
make clean
|
|
|
|
rm CMakeCache.txt
|
|
|
|
fi
|
2012-08-06 07:21:26 +02:00
|
|
|
}
|
2013-07-25 08:55:19 +02:00
|
|
|
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
|
|
|
|
cp bin.host/gen_pfs_lex_token ${wrksrc}/storage/perfschema
|
|
|
|
export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql:${wrksrc}/storage/perfschema
|
|
|
|
fi
|
2012-08-06 07:21:26 +02:00
|
|
|
}
|
2013-07-25 08:55:19 +02:00
|
|
|
post_install() {
|
2012-08-06 07:21:26 +02:00
|
|
|
# Remove unneeded stuff.
|
|
|
|
rm -rf ${DESTDIR}/usr/{sql-bench,mysql-test,data}
|
|
|
|
rm -f ${DESTDIR}/usr/share/man/man1/mysql-test-run.pl.1
|
2010-03-04 13:50:13 +01:00
|
|
|
|
2012-08-06 07:21:26 +02:00
|
|
|
# Configuration file.
|
|
|
|
vinstall ${FILESDIR}/my.cnf 640 etc/mysql
|
2010-03-04 13:50:13 +01:00
|
|
|
|
2012-08-06 07:21:26 +02:00
|
|
|
# systemd service.
|
2014-10-13 17:48:44 +02: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.tmpfilesd 644 usr/lib/tmpfiles.d mysqld.conf
|
|
|
|
fi
|
|
|
|
# runit service
|
|
|
|
vsv mysqld
|
2010-03-04 13:50:13 +01:00
|
|
|
}
|
2013-04-14 04:24:51 +02:00
|
|
|
|
|
|
|
libmysqlclient_package() {
|
2013-09-23 17:13:46 +02:00
|
|
|
short_desc+=" - client library"
|
2013-04-14 04:24:51 +02:00
|
|
|
pkg_install() {
|
2013-07-25 08:55:19 +02:00
|
|
|
vmove "usr/lib/libmysqlclient*.so.*"
|
2013-04-14 04:24:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
libmysqlclient-devel_package() {
|
|
|
|
depends="libmysqlclient>=${version}_${revision}"
|
2013-09-23 17:13:46 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-14 04:24:51 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/mysql_config
|
|
|
|
vmove usr/share/man/man1/mysql_config.1
|
|
|
|
vmove usr/include
|
|
|
|
vmove "usr/lib/*.a"
|
2013-07-25 08:55:19 +02:00
|
|
|
vmove "usr/lib/*.so"
|
2013-04-14 04:24:51 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
mysql-client_package() {
|
|
|
|
depends="perl"
|
2013-09-23 17:13:46 +02:00
|
|
|
short_desc+=" - database client binaries"
|
2013-04-14 04:24:51 +02: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
|
|
|
|
}
|
|
|
|
}
|