The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / mysql / mysql.mk
1 ################################################################################
2 #
3 # mysql
4 #
5 ################################################################################
6
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
14 MYSQL_LICENSE = GPLv2
15 MYSQL_LICENSE_FILES = README COPYING
16
17 MYSQL_CONF_ENV = \
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
25
26 MYSQL_CONF_OPTS = \
27         --without-ndb-binlog \
28         --without-docs \
29         --without-man \
30         --without-libedit \
31         --without-readline \
32         --with-low-memory \
33         --enable-thread-safe-client \
34         --disable-mysql-maintainer-mode
35
36 ifeq ($(BR2_PACKAGE_OPENSSL),y)
37 MYSQL_DEPENDENCIES += openssl
38 endif
39
40 ifeq ($(BR2_PACKAGE_ZLIB),y)
41 MYSQL_DEPENDENCIES += zlib
42 endif
43
44 ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
45 MYSQL_DEPENDENCIES += host-mysql host-bison
46 HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses
47
48 HOST_MYSQL_CONF_OPTS = \
49         --with-embedded-server \
50         --disable-mysql-maintainer-mode
51
52 MYSQL_CONF_OPTS += \
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
68
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
73 else
74 MYSQL_CONF_OPTS += --without-debug
75 endif
76
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
85 endef
86
87 define HOST_MYSQL_INSTALL_CMDS
88         $(INSTALL) -m 0755  $(@D)/sql/gen_lex_hash  $(HOST_DIR)/usr/bin/
89 endef
90
91 define MYSQL_USERS
92         mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
93 endef
94
95 define MYSQL_ADD_FOLDER
96         $(INSTALL) -d $(TARGET_DIR)/var/mysql
97 endef
98
99 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER
100
101 define MYSQL_INSTALL_INIT_SYSV
102         $(INSTALL) -D -m 0755 package/mysql/S97mysqld \
103                 $(TARGET_DIR)/etc/init.d/S97mysqld
104 endef
105
106 else
107 MYSQL_CONF_OPTS += \
108         --without-server
109 endif
110
111
112 define MYSQL_REMOVE_TEST_PROGS
113         rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
114 endef
115
116 define MYSQL_ADD_MYSQL_LIB_PATH
117         echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
118 endef
119
120 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
121 MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
122
123 $(eval $(autotools-package))
124 $(eval $(host-autotools-package))