2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2008-06-01 20:08:48 +02:00
|
|
|
#
|
2014-01-21 15:08:28 +01:00
|
|
|
# mysql
|
2008-06-01 20:08:48 +02:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-04-30 14:43:50 +02:00
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
MYSQL_VERSION_MAJOR = 5.1
|
2014-02-02 21:52:09 +01:00
|
|
|
MYSQL_VERSION = $(MYSQL_VERSION_MAJOR).73
|
2014-01-21 15:08:28 +01:00
|
|
|
MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
|
|
|
|
MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_VERSION_MAJOR)
|
|
|
|
MYSQL_INSTALL_STAGING = YES
|
|
|
|
MYSQL_DEPENDENCIES = readline ncurses
|
|
|
|
MYSQL_AUTORECONF = YES
|
|
|
|
MYSQL_LICENSE = GPLv2
|
|
|
|
MYSQL_LICENSE_FILES = README COPYING
|
2010-07-16 11:18:09 +02:00
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
MYSQL_CONF_ENV = \
|
2010-07-16 11:18:09 +02:00
|
|
|
ac_cv_sys_restartable_syscalls=yes \
|
|
|
|
ac_cv_path_PS=/bin/ps \
|
|
|
|
ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
|
|
|
|
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
|
|
|
|
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
|
|
|
|
ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
|
|
|
|
mysql_cv_new_rl_interface=yes
|
2008-06-01 20:08:48 +02:00
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
MYSQL_CONF_OPT = \
|
2008-06-01 20:08:48 +02:00
|
|
|
--without-ndb-binlog \
|
|
|
|
--without-docs \
|
|
|
|
--without-man \
|
|
|
|
--without-libedit \
|
2010-07-16 11:18:09 +02:00
|
|
|
--without-readline \
|
2008-06-01 20:08:48 +02:00
|
|
|
--with-low-memory \
|
2014-04-21 14:48:23 +02:00
|
|
|
--enable-thread-safe-client \
|
|
|
|
--disable-mysql-maintainer-mode
|
2008-06-01 20:08:48 +02:00
|
|
|
|
2014-05-17 12:32:44 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
MYSQL_DEPENDENCIES += openssl
|
|
|
|
endif
|
|
|
|
|
2014-05-17 12:32:43 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
MYSQL_DEPENDENCIES += zlib
|
|
|
|
endif
|
|
|
|
|
2014-02-12 23:39:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
|
|
|
|
MYSQL_DEPENDENCIES += host-mysql host-bison
|
2014-03-04 15:50:03 +01:00
|
|
|
HOST_MYSQL_DEPENDENCIES = host-zlib
|
2014-02-12 23:39:33 +01:00
|
|
|
|
|
|
|
HOST_MYSQL_CONF_OPT = \
|
2014-04-21 14:48:23 +02:00
|
|
|
--with-embedded-server \
|
|
|
|
--disable-mysql-maintainer-mode
|
2014-02-12 23:39:33 +01:00
|
|
|
|
|
|
|
MYSQL_CONF_OPT += \
|
2014-03-04 15:50:00 +01:00
|
|
|
--localstatedir=/var/mysql \
|
2014-02-12 23:39:33 +01:00
|
|
|
--with-atomic-ops=up \
|
|
|
|
--with-embedded-server \
|
|
|
|
--without-query-cache \
|
|
|
|
--without-plugin-partition \
|
|
|
|
--without-plugin-daemon_example \
|
|
|
|
--without-plugin-ftexample \
|
|
|
|
--without-plugin-archive \
|
|
|
|
--without-plugin-blackhole \
|
|
|
|
--without-plugin-example \
|
|
|
|
--without-plugin-federated \
|
|
|
|
--without-plugin-ibmdb2i \
|
|
|
|
--without-plugin-innobase \
|
|
|
|
--without-plugin-innodb_plugin \
|
|
|
|
--without-plugin-ndbcluster
|
|
|
|
|
2014-02-12 23:39:34 +01:00
|
|
|
# Debugging is only available for the server, so no need for
|
|
|
|
# this if-block outside of the server if-block
|
|
|
|
ifeq ($(BR2_ENABLE_DEBUG),y)
|
|
|
|
MYSQL_CONF_OPT += --with-debug=full
|
|
|
|
else
|
|
|
|
MYSQL_CONF_OPT += --without-debug
|
|
|
|
endif
|
|
|
|
|
2014-02-12 23:39:33 +01:00
|
|
|
define HOST_MYSQL_BUILD_CMDS
|
|
|
|
$(MAKE) -C $(@D)/include my_config.h
|
|
|
|
$(MAKE) -C $(@D)/mysys libmysys.a
|
|
|
|
$(MAKE) -C $(@D)/strings libmystrings.a
|
|
|
|
$(MAKE) -C $(@D)/vio libvio.a
|
|
|
|
$(MAKE) -C $(@D)/dbug libdbug.a
|
|
|
|
$(MAKE) -C $(@D)/regex libregex.a
|
|
|
|
$(MAKE) -C $(@D)/sql gen_lex_hash
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_MYSQL_INSTALL_CMDS
|
|
|
|
$(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/
|
|
|
|
endef
|
|
|
|
|
2014-03-04 15:50:01 +01:00
|
|
|
define MYSQL_USERS
|
|
|
|
mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
|
|
|
|
endef
|
|
|
|
|
2014-03-04 15:50:00 +01:00
|
|
|
define MYSQL_ADD_FOLDER
|
|
|
|
$(INSTALL) -d $(TARGET_DIR)/var/mysql
|
|
|
|
endef
|
|
|
|
|
|
|
|
MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER
|
|
|
|
|
2014-03-04 15:50:02 +01:00
|
|
|
define MYSQL_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/mysql/S97mysqld \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S97mysqld
|
|
|
|
endef
|
|
|
|
|
2014-02-12 23:39:33 +01:00
|
|
|
else
|
|
|
|
MYSQL_CONF_OPT += \
|
|
|
|
--without-server
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
define MYSQL_REMOVE_TEST_PROGS
|
2009-01-29 22:33:32 +01:00
|
|
|
rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
|
2010-09-01 20:50:52 +02:00
|
|
|
endef
|
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
define MYSQL_ADD_MYSQL_LIB_PATH
|
2011-02-10 11:12:49 +01:00
|
|
|
echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
|
|
|
|
endef
|
|
|
|
|
2014-01-21 15:08:28 +01:00
|
|
|
MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
|
|
|
|
MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
|
2010-09-01 20:50:52 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2014-02-12 23:39:33 +01:00
|
|
|
$(eval $(host-autotools-package))
|