1 ################################################################################
5 ################################################################################
7 MARIADB_VERSION
= 10.1.21
8 MARIADB_SITE
= https
://downloads.mariadb.org
/interstitial
/mariadb-
$(MARIADB_VERSION
)/source
9 MARIADB_LICENSE
= GPLv2
(server
), GPLv2 with FLOSS exception
(GPL client library
), LGPLv2
(LGPL client library
)
10 MARIADB_LICENSE_FILES
= README COPYING COPYING.LESSER
11 MARIADB_INSTALL_STAGING
= YES
12 MARIADB_PROVIDES
= mysql
14 MARIADB_DEPENDENCIES
= \
23 # We won't need unit tests
24 MARIADB_CONF_OPTS
+= -DWITH_UNIT_TESTS
=0
26 # Mroonga needs libstemmer. Some work still needs to be done before it can be
27 # included in buildroot. Disable it for now.
28 MARIADB_CONF_OPTS
+= -DWITHOUT_MROONGA
=1
30 # This value is determined automatically during straight compile by compiling
31 # and running a test code. You cannot do that during cross-compile. However the
32 # stack grows downward in most if not all modern systems. The only exception I
33 # am aware of is PA-RISC which is not supported by buildroot. Therefore it makes
34 # sense to hardcode the value. If an arch is added the stack of which grows up
35 # one should expect unpredictable behavior at run time.
36 MARIADB_CONF_OPTS
+= -DSTACK_DIRECTION
=-1
38 # Jemalloc was added for TokuDB. Since its configure script seems somewhat broken
39 # when it comes to cross-compilation we shall disable it and also disable TokuDB.
40 MARIADB_CONF_OPTS
+= -DWITH_JEMALLOC
=no
-DWITHOUT_TOKUDB
=1
42 # Make it explicit that we are cross-compiling
43 MARIADB_CONF_OPTS
+= -DCMAKE_CROSSCOMPILING
=1
45 # Explicitly disable dtrace to avoid detection of a host version
46 MARIADB_CONF_OPTS
+= -DENABLE_DTRACE
=0
48 ifeq ($(BR2_PACKAGE_MARIADB_SERVER
),y
)
49 MARIADB_CONF_OPTS
+= -DWITH_EMBEDDED_SERVER
=ON
51 MARIADB_CONF_OPTS
+= -DWITHOUT_SERVER
=ON
54 MARIADB_CONF_OPTS
+= \
55 -DINSTALL_DOCDIR
=share
/doc
/mariadb-
$(MARIADB_VERSION
) \
56 -DINSTALL_DOCREADMEDIR
=share
/doc
/mariadb-
$(MARIADB_VERSION
) \
57 -DINSTALL_MANDIR
=share
/man \
58 -DINSTALL_MYSQLSHAREDIR
=share
/mysql \
59 -DINSTALL_MYSQLTESTDIR
=share
/mysql
/test \
60 -DINSTALL_PLUGINDIR
=lib
/mysql
/plugin \
61 -DINSTALL_SBINDIR
=sbin \
62 -DINSTALL_SCRIPTDIR
=bin \
63 -DINSTALL_SQLBENCHDIR
=share
/mysql
/bench \
64 -DINSTALL_SUPPORTFILESDIR
=share
/mysql \
65 -DMYSQL_DATADIR
=/var
/lib
/mysql \
66 -DMYSQL_UNIX_ADDR
=$(MYSQL_SOCKET
)
68 # Some helpers must be compiled for host in order to crosscompile mariadb for
69 # the target. They are then included by import_executables.cmake which is
70 # generated during the build of the host helpers. It is not necessary to build
71 # the whole host package, only the "import_executables" target.
72 # -DIMPORT_EXECUTABLES=$(HOST_MARIADB_BUILDDIR)/import_executables.cmake
73 # must then be passed to cmake during target build.
74 # see also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
75 HOST_MARIADB_MAKE_OPTS
= import_executables
77 MARIADB_CONF_OPTS
+= \
78 -DIMPORT_EXECUTABLES
=$(HOST_MARIADB_BUILDDIR
)/import_executables.cmake
80 # Don't install host-mariadb. We just need to build import_executable
81 # Therefore only run 'true' and do nothing, not even the default action.
82 HOST_MARIADB_INSTALL_CMDS
= true
84 ifeq ($(BR2_PACKAGE_MARIADB_SERVER
),y
)
86 mysql
-1 mysql
-1 * /var
/lib
/mysql
- - MySQL Server
89 define MARIADB_INSTALL_INIT_SYSV
90 $(INSTALL
) -D
-m
0755 package
/mariadb
/S97mysqld \
91 $(TARGET_DIR
)/etc
/init.d
/S97mysqld
94 define MARIADB_INSTALL_INIT_SYSTEMD
95 $(INSTALL
) -D
-m
644 package
/mariadb
/mysqld.service \
96 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/mysqld.service
97 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
98 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/mysqld.service \
99 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/mysqld.service
103 define MARIADB_POST_INSTALL
104 mkdir
-p
$(TARGET_DIR
)/var
/lib
/mysql
105 $(INSTALL
) -D
-m
644 $(TARGET_DIR
)/usr
/share
/mysql
/my-small.cnf \
106 $(TARGET_DIR
)/etc
/mysql
/my.cnf
107 # We don't need this on the target as it's only useful in staging
108 $(RM
) $(TARGET_DIR
)/usr
/bin
/mysql_config
110 $(RM
) -r
$(TARGET_DIR
)/usr
/share
/mysql
/test
113 MARIADB_POST_INSTALL_TARGET_HOOKS
+= MARIADB_POST_INSTALL
115 $(eval
$(cmake-package
))
116 $(eval
$(host-cmake-package
))