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"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-08-12 09:19:16 +02:00
|
|
|
TERMUX_PKG_VERSION=2:10.5.4
|
2020-05-13 10:44:41 +02:00
|
|
|
TERMUX_PKG_SRCURL=http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-${TERMUX_PKG_VERSION:2}/source/mariadb-${TERMUX_PKG_VERSION:2}.tar.gz
|
2020-08-12 09:19:16 +02:00
|
|
|
TERMUX_PKG_SHA256=26db2becc9cec37e99a4e73390bd2eaa74568e21f9cf110359f4f68b37154c72
|
|
|
|
TERMUX_PKG_DEPENDS="libc++, libiconv, liblzma, ncurses, libedit, openssl, pcre2, libcrypt, libandroid-support, libandroid-glob, zlib, liblz4"
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_BREAKS="mariadb-dev"
|
|
|
|
TERMUX_PKG_REPLACES="mariadb-dev"
|
2020-01-05 23:27:57 +01:00
|
|
|
TERMUX_PKG_SERVICE_SCRIPT=("mysqld" 'exec mysqld --basedir=$PREFIX --datadir=$PREFIX/var/lib/mysql 2>&1')
|
2019-06-19 23:34:36 +02:00
|
|
|
|
2017-04-07 03:39:22 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2019-02-12 09:41:30 +01:00
|
|
|
-DBISON_EXECUTABLE=$(which bison)
|
|
|
|
-DGETCONF=$(which getconf)
|
2017-04-07 03:39:22 +02:00
|
|
|
-DBUILD_CONFIG=mysql_release
|
2019-02-12 09:41:30 +01:00
|
|
|
-DCAT_EXECUTABLE=$(which cat)
|
|
|
|
-DGIT_EXECUTABLE=$(which git)
|
2017-06-18 02:28:07 +02:00
|
|
|
-DGSSAPI_FOUND=NO
|
2020-08-12 09:19:16 +02:00
|
|
|
-DGRN_WITH_LZ4=ON
|
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
|
2017-07-02 13:57:36 +02:00
|
|
|
-DINSTALL_SBINDIR=$TERMUX_PREFIX/bin
|
2017-04-07 03:39:22 +02:00
|
|
|
-DMYSQL_DATADIR=$TERMUX_PREFIX/var/lib/mysql
|
2018-06-21 22:00:52 +02:00
|
|
|
-DPLUGIN_AUTH_GSSAPI_CLIENT=OFF
|
2017-04-07 03:39:22 +02:00
|
|
|
-DPLUGIN_AUTH_GSSAPI=NO
|
2020-02-17 12:04:44 +01:00
|
|
|
-DPLUGIN_AUTH_PAM=NO
|
2017-06-18 02:28:07 +02:00
|
|
|
-DPLUGIN_CONNECT=NO
|
2017-04-07 03:39:22 +02:00
|
|
|
-DPLUGIN_DAEMON_EXAMPLE=NO
|
|
|
|
-DPLUGIN_EXAMPLE=NO
|
2018-06-21 22:00:52 +02:00
|
|
|
-DPLUGIN_GSSAPI=OFF
|
2017-06-16 23:26:46 +02:00
|
|
|
-DPLUGIN_ROCKSDB=NO
|
2018-06-28 09:52:36 +02:00
|
|
|
-DPLUGIN_TOKUDB=NO
|
2018-08-17 23:57:04 +02:00
|
|
|
-DPLUGIN_SERVER_AUDIT=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
|
2020-08-12 09:19:16 +02:00
|
|
|
-DWITH_LZ4=system
|
2017-04-07 03:39:22 +02:00
|
|
|
-DWITH_READLINE=OFF
|
|
|
|
-DWITH_SSL=system
|
|
|
|
-DWITH_WSREP=False
|
2017-04-07 08:36:51 +02:00
|
|
|
-DWITH_ZLIB=system
|
|
|
|
-DWITH_INNODB_BZIP2=OFF
|
2020-08-12 09:19:16 +02:00
|
|
|
-DWITH_INNODB_LZ4=ON
|
2017-04-07 08:36:51 +02:00
|
|
|
-DWITH_INNODB_LZMA=ON
|
|
|
|
-DWITH_INNODB_LZO=OFF
|
|
|
|
-DWITH_INNODB_SNAPPY=OFF
|
2017-05-08 23:29:24 +02:00
|
|
|
-DWITH_UNIT_TESTS=OFF
|
2018-07-23 01:26:38 +02:00
|
|
|
-DINSTALL_SYSCONFDIR=$TERMUX_PREFIX/etc
|
2017-04-07 03:39:22 +02:00
|
|
|
"
|
2017-02-04 23:21:33 +01:00
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
|
|
|
TERMUX_PKG_CONFLICTS="mysql"
|
2020-05-13 11:18:38 +02:00
|
|
|
|
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="
|
|
|
|
bin/mysqltest*
|
|
|
|
share/man/man1/mysql-test-run.pl.1
|
|
|
|
mysql-test
|
|
|
|
sql-bench
|
|
|
|
"
|
2017-02-04 23:21:33 +01:00
|
|
|
|
2020-02-17 12:04:44 +01:00
|
|
|
# i686 build fails due to:
|
|
|
|
# /home/builder/.termux-build/mariadb/src/include/my_pthread.h:822:10: error: use of undeclared identifier 'my_atomic_add32'
|
|
|
|
# (void) my_atomic_add32_explicit(value, 1, MY_MEMORY_ORDER_RELAXED);
|
|
|
|
TERMUX_PKG_BLACKLISTED_ARCHES="i686"
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_host_build() {
|
2017-02-04 23:21:33 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_pre_configure() {
|
2019-08-08 14:25:54 +02:00
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
|
|
|
|
2017-07-10 01:49:17 +02:00
|
|
|
CPPFLAGS+=" -Dushort=u_short"
|
|
|
|
|
|
|
|
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
2019-12-29 20:00:28 +01:00
|
|
|
CPPFLAGS+=" -D__off64_t_defined"
|
2017-07-10 01:49:17 +02:00
|
|
|
fi
|
2017-07-02 13:57:36 +02:00
|
|
|
|
|
|
|
if [ $TERMUX_ARCH = "i686" ]; then
|
|
|
|
# Avoid undefined reference to __atomic_load_8:
|
2017-07-02 21:41:14 +02:00
|
|
|
CFLAGS+=" -latomic"
|
2017-07-02 13:57:36 +02:00
|
|
|
fi
|
2017-02-04 23:21:33 +01:00
|
|
|
}
|
|
|
|
|
2019-02-26 00:26:00 +01:00
|
|
|
termux_step_post_massage() {
|
|
|
|
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/my.cnf.d
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_create_debscripts() {
|
2017-07-17 06:27:42 +02:00
|
|
|
echo "if [ ! -e "$TERMUX_PREFIX/var/lib/mysql" ]; then" > postinst
|
|
|
|
echo " echo 'Initializing mysql data directory...'" >> postinst
|
|
|
|
echo " mkdir -p $TERMUX_PREFIX/var/lib/mysql" >> postinst
|
2019-04-24 23:31:52 +02:00
|
|
|
echo " $TERMUX_PREFIX/bin/mysql_install_db --user=\$(whoami) --datadir=$TERMUX_PREFIX/var/lib/mysql --basedir=$TERMUX_PREFIX" >> postinst
|
2017-07-17 06:27:42 +02:00
|
|
|
echo "fi" >> postinst
|
2017-02-04 23:21:33 +01:00
|
|
|
echo "exit 0" >> postinst
|
|
|
|
chmod 0755 postinst
|
|
|
|
}
|