2017-02-04 23:21:33 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://mariadb.org
|
2017-04-07 03:39:22 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="A drop-in replacement for mysql server"
|
2017-06-16 23:26:46 +02:00
|
|
|
TERMUX_PKG_VERSION=10.2.6
|
|
|
|
TERMUX_PKG_SRCURL=https://ftp.osuosl.org/pub/mariadb/mariadb-$TERMUX_PKG_VERSION/source/mariadb-$TERMUX_PKG_VERSION.tar.gz
|
|
|
|
TERMUX_PKG_SHA256=c385c76e40d6e5f0577eba021805da5f494a30c9ef51884baefe206d5658a2e5
|
2017-04-07 03:39:22 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2017-04-07 08:36:51 +02:00
|
|
|
-DBISON_EXECUTABLE=`which bison`
|
2017-04-07 03:39:22 +02:00
|
|
|
-DBUILD_CONFIG=mysql_release
|
2017-04-07 08:36:51 +02:00
|
|
|
-DCAT_EXECUTABLE=`which cat`
|
2017-04-07 03:39:22 +02:00
|
|
|
-DENABLED_LOCAL_INFILE=ON
|
|
|
|
-DHAVE_UCONTEXT_H=False
|
|
|
|
-DIMPORT_EXECUTABLES=$TERMUX_PKG_HOSTBUILD_DIR/import_executables.cmake
|
2017-04-10 16:59:29 +02:00
|
|
|
-DINSTALL_LAYOUT=DEB
|
2017-04-07 03:39:22 +02:00
|
|
|
-DINSTALL_UNIX_ADDRDIR=$TERMUX_PREFIX/tmp/mysqld.sock
|
|
|
|
-DMYSQL_DATADIR=$TERMUX_PREFIX/var/lib/mysql
|
|
|
|
-DPLUGIN_AUTH_GSSAPI_CLIENT=NO
|
|
|
|
-DPLUGIN_AUTH_GSSAPI=NO
|
|
|
|
-DPLUGIN_DAEMON_EXAMPLE=NO
|
|
|
|
-DPLUGIN_EXAMPLE=NO
|
|
|
|
-DPLUGIN_GSSAPI=NO
|
2017-06-16 23:26:46 +02:00
|
|
|
-DPLUGIN_ROCKSDB=NO
|
2017-05-08 23:29:24 +02:00
|
|
|
-DPLUGIN_TOKUDB=NO
|
2017-04-07 03:39:22 +02:00
|
|
|
-DSTACK_DIRECTION=-1
|
|
|
|
-DTMPDIR=$TERMUX_PREFIX/tmp
|
|
|
|
-DWITH_EXTRA_CHARSETS=complex
|
|
|
|
-DWITH_JEMALLOC=OFF
|
2017-05-08 22:53:49 +02:00
|
|
|
-DWITH_MARIABACKUP=OFF
|
2017-04-07 03:39:22 +02:00
|
|
|
-DWITH_PCRE=system
|
|
|
|
-DWITH_READLINE=OFF
|
|
|
|
-DWITH_SSL=system
|
|
|
|
-DWITH_WSREP=False
|
2017-04-07 08:36:51 +02:00
|
|
|
-DWITH_ZLIB=system
|
|
|
|
-DWITH_INNODB_BZIP2=OFF
|
|
|
|
-DWITH_INNODB_LZ4=OFF
|
|
|
|
-DWITH_INNODB_LZMA=ON
|
|
|
|
-DWITH_INNODB_LZO=OFF
|
|
|
|
-DWITH_INNODB_SNAPPY=OFF
|
2017-05-08 23:29:24 +02:00
|
|
|
-DWITH_UNIT_TESTS=OFF
|
2017-04-07 03:39:22 +02:00
|
|
|
"
|
2017-02-04 23:21:33 +01:00
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
2017-04-07 08:36:51 +02:00
|
|
|
TERMUX_PKG_DEPENDS="liblzma, ncurses, libedit, openssl, pcre, libcrypt, libandroid-support, libandroid-glob"
|
2017-02-04 23:21:33 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
|
|
|
|
TERMUX_PKG_CONFLICTS="mysql"
|
2017-04-07 03:39:22 +02:00
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="bin/mysqltest*"
|
2017-04-18 08:30:56 +02:00
|
|
|
# MariaDB doesn't support 32-bit off_t systems, see
|
|
|
|
# https://bugs.mysql.com/bug.php?id=41309
|
|
|
|
# It builds with -D_FILE_OFFSET_BITS=64 but the NDK only starts supporting
|
|
|
|
# that with unified headers,
|
|
|
|
# https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md
|
|
|
|
# The unified headers are new in the current NDK r14 release and contains some
|
|
|
|
# issues which are being fixed for r15, at which time we'll probably switch to it.
|
|
|
|
# In the meantime we don't build mariadb for 32-bit arches.
|
|
|
|
TERMUX_PKG_BLACKLISTED_ARCHES="arm,i686"
|
2017-02-04 23:21:33 +01:00
|
|
|
|
|
|
|
termux_step_host_build () {
|
|
|
|
termux_setup_cmake
|
2017-06-16 23:26:46 +02:00
|
|
|
cmake -G "Unix Makefiles" \
|
|
|
|
$TERMUX_PKG_SRCDIR \
|
|
|
|
-DWITH_SSL=bundled \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2017-02-04 23:21:33 +01:00
|
|
|
make -j $TERMUX_MAKE_PROCESSES import_executables
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_pre_configure () {
|
|
|
|
# it will try to define off64_t with off_t if unset
|
|
|
|
# and 32 bit Android has wrong off_t defined
|
|
|
|
CPPFLAGS="$CPPFLAGS -Dushort=u_short -D__off64_t_defined"
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install () {
|
|
|
|
mkdir -p $TERMUX_PREFIX/var/lib/mysql
|
|
|
|
# files not needed
|
2017-04-10 16:59:29 +02:00
|
|
|
rm -r $TERMUX_PREFIX/{mysql-test,sql-bench}
|
2017-02-04 23:21:33 +01:00
|
|
|
rm $TERMUX_PREFIX/share/man/man1/mysql-test-run.pl.1
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_create_debscripts () {
|
|
|
|
return
|
|
|
|
echo "echo 'Initializing mysql data directory...'" > postinst
|
|
|
|
echo "$TERMUX_PREFIX/bin/mysql_install_db --user=\`whoami\` --datadir=$TERMUX_PREFIX/var/lib/mysql --basedir=$TERMUX_PREFIX" >> postinst
|
|
|
|
echo "exit 0" >> postinst
|
|
|
|
chmod 0755 postinst
|
|
|
|
}
|