1 ################################################################################
5 ################################################################################
7 MYSQL_VERSION_MAJOR = 5.1
8 MYSQL_VERSION = $(MYSQL_VERSION_MAJOR).73
9 MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
10 MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_VERSION_MAJOR)
11 MYSQL_INSTALL_STAGING = YES
12 MYSQL_DEPENDENCIES = readline ncurses
13 MYSQL_AUTORECONF = YES
15 MYSQL_LICENSE_FILES = README COPYING
18 ac_cv_sys_restartable_syscalls=yes \
19 ac_cv_path_PS=/bin/ps \
20 ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
21 ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
22 ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
23 ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
24 mysql_cv_new_rl_interface=yes
27 --without-ndb-binlog \
33 --enable-thread-safe-client \
34 --disable-mysql-maintainer-mode
36 ifeq ($(BR2_PACKAGE_OPENSSL),y)
37 MYSQL_DEPENDENCIES += openssl
40 ifeq ($(BR2_PACKAGE_ZLIB),y)
41 MYSQL_DEPENDENCIES += zlib
44 ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
45 MYSQL_DEPENDENCIES += host-mysql host-bison
46 HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses
48 HOST_MYSQL_CONF_OPTS = \
49 --with-embedded-server \
50 --disable-mysql-maintainer-mode
53 --localstatedir=/var/mysql \
54 --with-atomic-ops=up \
55 --with-embedded-server \
56 --without-query-cache \
57 --without-plugin-partition \
58 --without-plugin-daemon_example \
59 --without-plugin-ftexample \
60 --without-plugin-archive \
61 --without-plugin-blackhole \
62 --without-plugin-example \
63 --without-plugin-federated \
64 --without-plugin-ibmdb2i \
65 --without-plugin-innobase \
66 --without-plugin-innodb_plugin \
67 --without-plugin-ndbcluster
69 # Debugging is only available for the server, so no need for
70 # this if-block outside of the server if-block
71 ifeq ($(BR2_ENABLE_DEBUG),y)
72 MYSQL_CONF_OPTS += --with-debug=full
74 MYSQL_CONF_OPTS += --without-debug
77 define HOST_MYSQL_BUILD_CMDS
78 $(MAKE) -C $(@D)/include my_config.h
79 $(MAKE) -C $(@D)/mysys libmysys.a
80 $(MAKE) -C $(@D)/strings libmystrings.a
81 $(MAKE) -C $(@D)/vio libvio.a
82 $(MAKE) -C $(@D)/dbug libdbug.a
83 $(MAKE) -C $(@D)/regex libregex.a
84 $(MAKE) -C $(@D)/sql gen_lex_hash
87 define HOST_MYSQL_INSTALL_CMDS
88 $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/
92 mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
95 define MYSQL_ADD_FOLDER
96 $(INSTALL) -d $(TARGET_DIR)/var/mysql
99 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER
101 define MYSQL_INSTALL_INIT_SYSV
102 $(INSTALL) -D -m 0755 package/mysql/S97mysqld \
103 $(TARGET_DIR)/etc/init.d/S97mysqld
112 define MYSQL_REMOVE_TEST_PROGS
113 rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
116 define MYSQL_ADD_MYSQL_LIB_PATH
117 echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
120 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
121 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
123 $(eval $(autotools-package))
124 $(eval $(host-autotools-package))