1 TERMUX_PKG_HOMEPAGE=https://mariadb.org
2 TERMUX_PKG_DESCRIPTION="A drop-in replacement for mysql server"
3 TERMUX_PKG_VERSION=10.2.6
4 TERMUX_PKG_SRCURL=https://ftp.osuosl.org/pub/mariadb/mariadb-$TERMUX_PKG_VERSION/source/mariadb-$TERMUX_PKG_VERSION.tar.gz
5 TERMUX_PKG_SHA256=c385c76e40d6e5f0577eba021805da5f494a30c9ef51884baefe206d5658a2e5
6 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
7 -DBISON_EXECUTABLE=`which bison`
8 -DBUILD_CONFIG=mysql_release
9 -DCAT_EXECUTABLE=`which cat`
11 -DENABLED_LOCAL_INFILE=ON
12 -DHAVE_UCONTEXT_H=False
13 -DIMPORT_EXECUTABLES=$TERMUX_PKG_HOSTBUILD_DIR/import_executables.cmake
15 -DINSTALL_UNIX_ADDRDIR=$TERMUX_PREFIX/tmp/mysqld.sock
16 -DMYSQL_DATADIR=$TERMUX_PREFIX/var/lib/mysql
17 -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
18 -DPLUGIN_AUTH_GSSAPI=NO
20 -DPLUGIN_DAEMON_EXAMPLE=NO
26 -DTMPDIR=$TERMUX_PREFIX/tmp
27 -DWITH_EXTRA_CHARSETS=complex
29 -DWITH_MARIABACKUP=OFF
35 -DWITH_INNODB_BZIP2=OFF
39 -DWITH_INNODB_SNAPPY=OFF
42 TERMUX_PKG_HOSTBUILD=true
43 TERMUX_PKG_DEPENDS="liblzma, ncurses, libedit, openssl, pcre, libcrypt, libandroid-support, libandroid-glob"
44 TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
45 TERMUX_PKG_CONFLICTS="mysql"
46 TERMUX_PKG_RM_AFTER_INSTALL="bin/mysqltest*"
47 # MariaDB doesn't support 32-bit off_t systems, see
48 # https://bugs.mysql.com/bug.php?id=41309
49 # It builds with -D_FILE_OFFSET_BITS=64 but the NDK only starts supporting
50 # that with unified headers,
51 # https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md
52 # The unified headers are new in the current NDK r14 release and contains some
53 # issues which are being fixed for r15, at which time we'll probably switch to it.
54 # In the meantime we don't build mariadb for 32-bit arches.
55 TERMUX_PKG_BLACKLISTED_ARCHES="arm,i686"
57 termux_step_host_build () {
59 cmake -G "Unix Makefiles" \
62 -DCMAKE_BUILD_TYPE=Release
63 make -j $TERMUX_MAKE_PROCESSES import_executables
66 termux_step_pre_configure () {
67 # it will try to define off64_t with off_t if unset
68 # and 32 bit Android has wrong off_t defined
69 CPPFLAGS="$CPPFLAGS -Dushort=u_short -D__off64_t_defined"
72 termux_step_post_make_install () {
73 mkdir -p $TERMUX_PREFIX/var/lib/mysql
75 rm -r $TERMUX_PREFIX/{mysql-test,sql-bench}
76 rm $TERMUX_PREFIX/share/man/man1/mysql-test-run.pl.1
79 termux_step_create_debscripts () {
81 echo "echo 'Initializing mysql data directory...'" > postinst
82 echo "$TERMUX_PREFIX/bin/mysql_install_db --user=\`whoami\` --datadir=$TERMUX_PREFIX/var/lib/mysql --basedir=$TERMUX_PREFIX" >> postinst
83 echo "exit 0" >> postinst