You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

586 lines
19 KiB

  1. #
  2. # Copyright (C) 2018 Sebastian Kemper <sebastian_ml@gmx.net>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mariadb
  9. PKG_VERSION:=10.2.17
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL := \
  13. https://mirror.netcologne.de/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  14. https://mirror.lstn.net/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  15. https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
  16. https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
  17. PKG_HASH:=e7b3078f8de874a4d451242a8a3eed49bf6f916dcd52fc3efa55886f5f35be27
  18. PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
  19. PKG_LICENSE:=GPL-2.0 LGPL-2.1
  20. PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
  21. HOST_BUILD_PARALLEL:=1
  22. PKG_BUILD_PARALLEL:=1
  23. PKG_USE_MIPS16:=0
  24. HOST_BUILD_DEPENDS:=libxml2/host
  25. # Without libevent2 tests/async_queries sporadically fails on the bots
  26. PKG_BUILD_DEPENDS:=libevent2 mariadb/host
  27. CMAKE_INSTALL:=1
  28. PLUGIN_DIR:=/usr/lib/mysql/plugin
  29. MARIADB_SERVER_PLUGINS := \
  30. adt_null \
  31. auth_0x0100 \
  32. auth_ed25519 \
  33. auth_socket \
  34. auth_test_plugin \
  35. client_ed25519 \
  36. debug_key_management \
  37. dialog_examples \
  38. disks \
  39. example_key_management \
  40. feedback \
  41. file_key_management \
  42. ha_archive \
  43. ha_blackhole \
  44. ha_connect \
  45. ha_example \
  46. ha_federated \
  47. ha_federatedx \
  48. ha_sequence \
  49. ha_sphinx \
  50. ha_spider \
  51. ha_test_sql_discovery \
  52. handlersocket \
  53. libdaemon_example \
  54. locales \
  55. metadata_lock_info \
  56. mypluglib \
  57. qa_auth_client \
  58. qa_auth_interface \
  59. qa_auth_server \
  60. query_cache_info \
  61. query_response_time \
  62. semisync_master \
  63. semisync_slave \
  64. server_audit \
  65. simple_password_check \
  66. sql_errlog \
  67. wsrep_info
  68. PKG_CONFIG_DEPENDS := \
  69. $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-%,$(subst _,-,$(MARIADB_SERVER_PLUGINS))) \
  70. CONFIG_PACKAGE_mariadb-server
  71. plugin-adt_null := PLUGIN_AUDIT_NULL
  72. plugin-auth_0x0100 := PLUGIN_AUTH_0X0100
  73. plugin-auth_ed25519 := PLUGIN_AUTH_ED25519
  74. plugin-auth_socket := PLUGIN_AUTH_SOCKET
  75. plugin-auth_test_plugin := PLUGIN_AUTH_TEST_PLUGIN
  76. plugin-client_ed25519 := PLUGIN_CLIENT_ED25519
  77. plugin-debug_key_management := PLUGIN_DEBUG_KEY_MANAGEMENT
  78. plugin-dialog_examples := PLUGIN_DIALOG_EXAMPLES
  79. plugin-disks := PLUGIN_DISKS
  80. plugin-example_key_management := PLUGIN_EXAMPLE_KEY_MANAGEMENT
  81. plugin-feedback := PLUGIN_FEEDBACK
  82. plugin-file_key_management := PLUGIN_FILE_KEY_MANAGEMENT
  83. plugin-ha_archive := PLUGIN_ARCHIVE
  84. plugin-ha_blackhole := PLUGIN_BLACKHOLE
  85. plugin-ha_connect := PLUGIN_CONNECT
  86. plugin-ha_example := PLUGIN_EXAMPLE
  87. plugin-ha_federated := PLUGIN_FEDERATED
  88. plugin-ha_federatedx := PLUGIN_FEDERATEDX
  89. plugin-ha_sequence := PLUGIN_SEQUENCE
  90. plugin-ha_sphinx := PLUGIN_SPHINX
  91. plugin-ha_spider := PLUGIN_SPIDER
  92. plugin-ha_test_sql_discovery := PLUGIN_TEST_SQL_DISCOVERY
  93. plugin-handlersocket := PLUGIN_HANDLERSOCKET
  94. plugin-libdaemon_example := PLUGIN_DAEMON_EXAMPLE
  95. plugin-locales := PLUGIN_LOCALES
  96. plugin-metadata_lock_info := PLUGIN_METADATA_LOCK_INFO
  97. plugin-mypluglib := PLUGIN_FTEXAMPLE
  98. plugin-qa_auth_client := PLUGIN_QA_AUTH_CLIENT
  99. plugin-qa_auth_interface := PLUGIN_QA_AUTH_INTERFACE
  100. plugin-qa_auth_server := PLUGIN_QA_AUTH_SERVER
  101. plugin-query_cache_info := PLUGIN_QUERY_CACHE_INFO
  102. plugin-query_response_time := PLUGIN_QUERY_RESPONSE_TIME
  103. plugin-semisync_master := PLUGIN_SEMISYNC_MASTER
  104. plugin-semisync_slave := PLUGIN_SEMISYNC_SLAVE
  105. plugin-server_audit := PLUGIN_SERVER_AUDIT
  106. plugin-simple_password_check := PLUGIN_SIMPLE_PASSWORD_CHECK
  107. plugin-sql_errlog := PLUGIN_SQL_ERRLOG
  108. plugin-wsrep_info := PLUGIN_WSREP_INFO
  109. MARIADB_CLIENT := \
  110. mysql \
  111. mysqlcheck
  112. MARIADB_CLIENT_EXTRA := \
  113. mysql_find_rows \
  114. mysql_waitpid \
  115. mysqlaccess \
  116. mysqladmin \
  117. mysqldump \
  118. mysqlimport \
  119. mysqlshow \
  120. mysqlslap \
  121. mytop
  122. MARIADB_SERVER := \
  123. innochecksum \
  124. my_print_defaults \
  125. mysql_install_db \
  126. mysql_upgrade \
  127. mysqld
  128. MARIADB_SERVER_EXTRA := \
  129. aria* \
  130. mariabackup \
  131. msql2mysql \
  132. myisam_ftdump \
  133. myisamchk \
  134. myisamlog \
  135. myisampack \
  136. mysql_convert_table_format \
  137. mysql_fix_extensions \
  138. mysql_plugin \
  139. mysql_secure_installation \
  140. mysql_setpermission \
  141. mysql_tzinfo_to_sql \
  142. mysqlbinlog \
  143. mysqld_multi \
  144. mysqld_safe \
  145. mysqld_safe_helper \
  146. mysqldumpslow \
  147. mysqlhotcopy \
  148. perror \
  149. replace \
  150. resolve_stack_dump
  151. include $(INCLUDE_DIR)/package.mk
  152. include $(INCLUDE_DIR)/host-build.mk
  153. include $(INCLUDE_DIR)/cmake.mk
  154. include $(INCLUDE_DIR)/nls.mk
  155. MARIADB_COMMON_DEPENDS := \
  156. $(ICONV_DEPENDS) \
  157. +libatomic \
  158. +libopenssl \
  159. +libstdcpp \
  160. +zlib
  161. # Pass CPPFLAGS in the CFLAGS as otherwise the build system will
  162. # ignore them.
  163. TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
  164. define Package/mariadb/install/bin
  165. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
  166. endef
  167. define Package/mariadb/description/Default
  168. MariaDB is a fast, stable and true multi-user, multi-threaded SQL
  169. database server. SQL (Structured Query Language) is the most popular
  170. database query language in the world. The main goals of MariaDB are
  171. speed, robustness and ease of use.
  172. endef
  173. define Package/libmariadb
  174. SECTION:=libs
  175. CATEGORY:=Libraries
  176. DEPENDS:=$(MARIADB_COMMON_DEPENDS)
  177. TITLE:=MariaDB database client library
  178. URL:=https://mariadb.org/
  179. PROVIDES:=libmariadbclient libmysqlclient libmysqlclient-r
  180. endef
  181. define Package/libmariadb/description
  182. $(call Package/mariadb/description/Default)
  183. This package includes the client library.
  184. endef
  185. define Package/mariadb/Default
  186. SECTION:=utils
  187. CATEGORY:=Utilities
  188. URL:=https://mariadb.org/
  189. SUBMENU:=database
  190. endef
  191. define Package/mariadb-client
  192. $(call Package/mariadb/Default)
  193. TITLE:=MariaDB database core client binaries
  194. DEPENDS:= \
  195. $(MARIADB_COMMON_DEPENDS) \
  196. +libncursesw
  197. endef
  198. define Package/mariadb-client/description
  199. $(call Package/mariadb/description/Default)
  200. This package includes the following core client binaries:
  201. $(subst $(space),$(newline),$(MARIADB_CLIENT))
  202. endef
  203. define Package/mariadb-client-extra
  204. $(call Package/mariadb/Default)
  205. TITLE:=MariaDB database extra client binaries
  206. DEPENDS:=mariadb-client
  207. endef
  208. define Package/mariadb-client-extra/description
  209. $(call Package/mariadb/description/Default)
  210. This package includes the following extra client binaries:
  211. $(subst $(space),$(newline),$(MARIADB_CLIENT_EXTRA))
  212. endef
  213. define Package/mariadb-extra-charsets
  214. $(call Package/mariadb/Default)
  215. TITLE:=MariaDB database extra character sets
  216. DEPENDS:=mariadb-server
  217. endef
  218. define Package/mariadb-extra-charsets/description
  219. $(call Package/mariadb/description/Default)
  220. This package contains single Byte character sets and collations that can
  221. be added at run time.
  222. endef
  223. define Package/mariadb-server
  224. $(call Package/mariadb/Default)
  225. DEPENDS:= \
  226. $(MARIADB_COMMON_DEPENDS) \
  227. +!arc:libaio \
  228. +liblzma \
  229. +libpcre \
  230. +resolveip
  231. TITLE:=MariaDB database core server binaries
  232. MENU:=1
  233. PROVIDES:=mysql-server
  234. USERID:=mariadb=376:mariadb=376
  235. endef
  236. define Package/mariadb-server/description
  237. $(call Package/mariadb/description/Default)
  238. This package includes the following core server binaries:
  239. $(subst $(space),$(newline),$(MARIADB_SERVER))
  240. endef
  241. define Package/mariadb-server-extra
  242. $(call Package/mariadb/Default)
  243. TITLE:=MariaDB database extra server binaries
  244. DEPENDS:=mariadb-server
  245. endef
  246. define Package/mariadb-server-extra/description
  247. $(call Package/mariadb/description/Default)
  248. This package includes the following extra server binaries:
  249. $(subst $(space),$(newline),$(MARIADB_SERVER_EXTRA))
  250. endef
  251. # We won't need unit tests
  252. CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0
  253. # This value is determined automatically during straight compile by compiling
  254. # and running a test code. You cannot do that during cross-compile. However the
  255. # stack grows downward in most if not all modern systems. The only exception
  256. # according to buildroot is PA-RISC which is not supported by OpenWrt as far as
  257. # I know. Therefore it makes sense to hardcode the value. If an arch is added
  258. # the stack of which grows up one should expect unpredictable behavior at run
  259. # time.
  260. CMAKE_OPTIONS += -DSTACK_DIRECTION=-1
  261. # Jemalloc was added for TokuDB. Since its configure script seems somewhat broken
  262. # when it comes to cross-compilation we shall disable it and also disable TokuDB.
  263. CMAKE_OPTIONS += -DWITH_JEMALLOC=no -DWITHOUT_TOKUDB=1
  264. # Make it explicit that we are cross-compiling
  265. CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1
  266. # Explicitly disable dtrace to avoid detection of a host version
  267. CMAKE_OPTIONS += -DENABLE_DTRACE=0
  268. # Prevent mariadb from messing with OpenWrt's C(XX)FLAGS
  269. CMAKE_OPTIONS += -DSECURITY_HARDENED=OFF
  270. ifeq ($(CONFIG_PACKAGE_mariadb-server),)
  271. CMAKE_OPTIONS += -DWITHOUT_SERVER=ON
  272. else
  273. CMAKE_OPTIONS += -DWITHOUT_SERVER=OFF
  274. endif
  275. CMAKE_OPTIONS += \
  276. -DCONNECT_WITH_JDBC=NO \
  277. -DCONNECT_WITH_LIBXML2=system \
  278. -DCONNECT_WITH_ODBC=NO \
  279. -DDEFAULT_CHARSET=utf8 \
  280. -DDEFAULT_COLLATION=utf8_general_ci \
  281. -DDISABLE_SHARED=NO \
  282. -DENABLED_PROFILING=OFF \
  283. -DENABLE_STATIC_LIBS=OFF \
  284. -DINSTALL_DOCDIR=share/doc/mariadb \
  285. -DINSTALL_DOCREADMEDIR=share/doc/mariadb \
  286. -DINSTALL_MANDIR=share/man \
  287. -DINSTALL_MYSQLSHAREDIR=share/mysql \
  288. -DINSTALL_MYSQLTESTDIR="" \
  289. -DINSTALL_PLUGINDIR=lib/mysql/plugin \
  290. -DINSTALL_SBINDIR=bin \
  291. -DINSTALL_SCRIPTDIR=bin \
  292. -DINSTALL_SQLBENCHDIR="" \
  293. -DINSTALL_SUPPORTFILESDIR=share/mysql \
  294. -DINSTALL_UNIX_ADDRDIR=/var/run/mysqld/mysqld.sock \
  295. -DMYSQLD_USER=mariadb \
  296. -DMYSQL_DATADIR=/var/lib/mysql \
  297. -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
  298. -DSKIP_TESTS=ON \
  299. -DWITH_ASAN=OFF \
  300. -DWITH_EMBEDDED_SERVER=OFF \
  301. -DWITH_EXTRA_CHARSETS=complex \
  302. -DWITH_INNODB_BZIP2=OFF \
  303. -DWITH_INNODB_LZ4=OFF \
  304. -DWITH_INNODB_LZMA=ON \
  305. -DWITH_INNODB_LZO=OFF \
  306. -DWITH_INNODB_SNAPPY=OFF \
  307. -DWITH_LIBEDIT=OFF \
  308. -DWITH_LIBNUMA=NO \
  309. -DWITH_LIBWRAP=OFF \
  310. -DWITH_LIBWSEP=OFF \
  311. -DWITH_MARIABACKUP=ON \
  312. -DWITH_PCRE=system \
  313. -DWITH_READLINE=OFF \
  314. -DWITH_SAFEMALLOC=OFF \
  315. -DWITH_SSL=system \
  316. -DWITH_SYSTEMD=no \
  317. -DWITH_VALGRIND=OFF \
  318. -DWITH_ZLIB=system
  319. # Default-disable some modules
  320. CMAKE_OPTIONS += \
  321. -DPLUGIN_CASSANDRA=NO \
  322. -DPLUGIN_MROONGA=NO \
  323. -DPLUGIN_OQGRAPH=NO \
  324. -DPLUGIN_ROCKSDB=NO \
  325. -DPLUGIN_TOKUDB=NO \
  326. -DPLUGIN_AUTH_PAM=NO \
  327. -DPLUGIN_AUTH_GSSAPI=NO \
  328. -DPLUGIN_AUTH_GSSAPI_CLIENT=NO \
  329. -DPLUGIN_CRACKLIB_PASSWORD_CHECK=NO
  330. # Help MariaDB find the correct libiconv.
  331. # nls.mk sets it up so that with CONFIG_BUILD_NLS libiconv-full would be used,
  332. # otherwise libiconv-stub (independent of the selected libc). MariaDB needs a
  333. # leg up to find/pick the right lib.
  334. CMAKE_OPTIONS += \
  335. -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \
  336. -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)
  337. CMAKE_OPTIONS += \
  338. $(foreach p,$(MARIADB_SERVER_PLUGINS),-D$(plugin-$(p))=$(if $(CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-$(subst _,-,$(p))),DYNAMIC,NO))
  339. # Set CMAKE_FIND_ROOT_PATH_MODE_INCLUDE and CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
  340. # to BOTH as otherwise the host build will not find some required dependencies
  341. # installed on the host machine, like ncurses.
  342. #
  343. # Add "$(STAGING_DIR_HOSTPKG)/lib" to the RPATH of the host helpers,
  344. # otherwise they might not find the location of a library at run time.
  345. CMAKE_HOST_OPTIONS += \
  346. -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
  347. -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
  348. -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
  349. -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOSTPKG)/lib" \
  350. -DCMAKE_SKIP_RPATH=FALSE \
  351. -DWITHOUT_SERVER=OFF \
  352. -DWITHOUT_TOKUDB=1
  353. # Some helpers must be compiled for host in order to crosscompile mariadb for
  354. # the target. They are then included by import_executables.cmake which is
  355. # generated during the build of the host helpers. It is not necessary to build
  356. # the whole host package, only the "import_executables" target.
  357. # -DIMPORT_EXECUTABLES=$(HOST_BUILD_DIR)/import_executables.cmake
  358. # must then be passed to cmake during target build.
  359. # See also https://mariadb.com/kb/en/mariadb/cross-compiling-mariadb/
  360. CMAKE_OPTIONS += -DIMPORT_EXECUTABLES=$(STAGING_DIR_HOSTPKG)/share/mariadb/import_executables.cmake
  361. define Host/Compile
  362. $(call Host/Compile/Default,import_executables)
  363. endef
  364. define Host/Install
  365. $(SED) 's|$(HOST_BUILD_DIR)|$(STAGING_DIR_HOSTPKG)/share/mariadb|' $(HOST_BUILD_DIR)/import_executables.cmake
  366. $(INSTALL_DIR) $(1)/share/mariadb/{dbug,extra,scripts,sql}
  367. $(INSTALL_BIN) $(HOST_BUILD_DIR)/dbug/factorial $(1)/share/mariadb/dbug
  368. $(INSTALL_BIN) $(HOST_BUILD_DIR)/extra/comp_err $(1)/share/mariadb/extra
  369. $(INSTALL_BIN) $(HOST_BUILD_DIR)/scripts/comp_sql $(1)/share/mariadb/scripts
  370. $(INSTALL_BIN) $(HOST_BUILD_DIR)/sql/{gen_lex_hash,gen_lex_token} $(1)/share/mariadb/sql
  371. $(INSTALL_DATA) $(HOST_BUILD_DIR)/import_executables.cmake $(1)/share/mariadb
  372. endef
  373. # LIBICONV_PLUG is used in GNU's libiconv for redefinition of exports [e.g.
  374. # from libiconv_open() to iconv_open()]. But in OpenWrt this variable is not set
  375. # when building libiconv-full. So when mariadb sets LIBICONV_PLUG it expects
  376. # iconv_open() to be available for example, which is not the case - only
  377. # libiconv_open() is. To address this prevent the variable from being set.
  378. # libiconv-stub does not use this variable, so there is no harm in always doing
  379. # this.
  380. define Build/Prepare
  381. $(call Build/Prepare/Default)
  382. $(SED) '/ADD_DEFINITIONS(-DLIBICONV_PLUG)/d' $(PKG_BUILD_DIR)/libmariadb/libmariadb/CMakeLists.txt
  383. endef
  384. define Build/InstallDev
  385. $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib/mysql $(1)/usr/lib/pkgconfig $(1)/usr/share/aclocal
  386. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin
  387. $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin
  388. $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include
  389. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
  390. cd $(1)/usr/lib/mysql; $(LN) ../lib{mariadb,mysqlclient}*.so* .
  391. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/mariadb.pc $(1)/usr/lib/pkgconfig
  392. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal
  393. endef
  394. define Package/libmariadb/install
  395. $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
  396. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
  397. $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/dialog.so $(1)$(PLUGIN_DIR)
  398. $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/mysql_clear_password.so $(1)$(PLUGIN_DIR)
  399. endef
  400. define Package/mariadb-client/install
  401. $(INSTALL_DIR) $(1)/usr/bin
  402. $(foreach b,$(MARIADB_CLIENT),$(call Package/mariadb/install/bin,$(1),$(b));)
  403. # Install convenience links for mysqlcheck multi-call binary
  404. cd $(1)/usr/bin; $(LN) mysqlcheck mysqlanalyze
  405. cd $(1)/usr/bin; $(LN) mysqlcheck mysqlrepair
  406. cd $(1)/usr/bin; $(LN) mysqlcheck mysqloptimize
  407. endef
  408. define Package/mariadb-client-extra/install
  409. $(INSTALL_DIR) $(1)/usr/bin
  410. $(foreach b,$(MARIADB_CLIENT_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
  411. endef
  412. define Package/mariadb-extra-charsets/install
  413. $(INSTALL_DIR) $(1)/usr/share/mysql/charsets
  414. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/charsets/* $(1)/usr/share/mysql/charsets
  415. endef
  416. define Package/mariadb-server/install
  417. $(INSTALL_DIR) $(1)/usr/bin
  418. $(foreach b,$(MARIADB_SERVER),$(call Package/mariadb/install/bin,$(1),$(b));)
  419. $(INSTALL_DIR) $(1)/etc/default
  420. $(INSTALL_DIR) $(1)/etc/init.d
  421. $(INSTALL_DIR) $(1)/etc/mysql/conf.d
  422. $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
  423. $(INSTALL_CONF) conf/my.cnf $(1)/etc/mysql
  424. $(INSTALL_CONF) conf/mysqld.default $(1)/etc/default/mysqld
  425. $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
  426. $(INSTALL_CONF) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/daemon_example.ini $(1)$(PLUGIN_DIR)
  427. $(INSTALL_DIR) $(1)/usr/share/mysql/english
  428. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
  429. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql
  430. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/maria_add_gis_sp_bootstrap.sql $(1)/usr/share/mysql
  431. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_performance_tables.sql $(1)/usr/share/mysql
  432. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql
  433. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql
  434. endef
  435. define Package/mariadb-server-extra/install
  436. $(INSTALL_DIR) $(1)/usr/bin
  437. $(foreach b,$(MARIADB_SERVER_EXTRA),$(call Package/mariadb/install/bin,$(1),$(b));)
  438. endef
  439. define Package/mariadb-server/conffiles
  440. /etc/default/mysqld
  441. /etc/mysql/my.cnf
  442. $(PLUGIN_DIR)/daemon_example.ini
  443. endef
  444. define BuildPlugin
  445. define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))
  446. $$(call Package/mariadb/Default)
  447. TITLE:=MariaDB database plugin
  448. DEPENDS:=mariadb-server $(patsubst +%,+PACKAGE_$(PKG_NAME)-server-plugin-$(subst _,-,$(1)):%,$(2))
  449. endef
  450. define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))/description
  451. $$(call Package/mariadb/description/Default)
  452. This package provides the $(1) plugin.
  453. endef
  454. define Package/$(PKG_NAME)-server-plugin-$(subst _,-,$(1))/install
  455. $(INSTALL_DIR) $$(1)$(PLUGIN_DIR)
  456. $(INSTALL_BIN) \
  457. $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/$(1).so \
  458. $$(1)$(PLUGIN_DIR)
  459. endef
  460. $$(eval $$(call BuildPackage,$(PKG_NAME)-server-plugin-$(subst _,-,$(1))))
  461. endef
  462. $(eval $(call HostBuild))
  463. $(eval $(call BuildPackage,libmariadb))
  464. $(eval $(call BuildPackage,mariadb-client))
  465. $(eval $(call BuildPackage,mariadb-client-extra))
  466. $(eval $(call BuildPackage,mariadb-extra-charsets))
  467. $(eval $(call BuildPackage,mariadb-server))
  468. $(eval $(call BuildPackage,mariadb-server-extra))
  469. $(eval $(call BuildPlugin,adt_null,))
  470. $(eval $(call BuildPlugin,auth_0x0100,))
  471. $(eval $(call BuildPlugin,auth_ed25519,))
  472. $(eval $(call BuildPlugin,auth_socket,))
  473. $(eval $(call BuildPlugin,auth_test_plugin,))
  474. $(eval $(call BuildPlugin,client_ed25519,))
  475. $(eval $(call BuildPlugin,debug_key_management,))
  476. $(eval $(call BuildPlugin,dialog_examples,))
  477. $(eval $(call BuildPlugin,disks,))
  478. $(eval $(call BuildPlugin,example_key_management,))
  479. $(eval $(call BuildPlugin,feedback,))
  480. $(eval $(call BuildPlugin,file_key_management,))
  481. $(eval $(call BuildPlugin,ha_archive,))
  482. $(eval $(call BuildPlugin,ha_blackhole,))
  483. $(eval $(call BuildPlugin,ha_connect,+libxml2))
  484. $(eval $(call BuildPlugin,ha_example,))
  485. $(eval $(call BuildPlugin,ha_federated,))
  486. $(eval $(call BuildPlugin,ha_federatedx,))
  487. $(eval $(call BuildPlugin,ha_sequence,))
  488. $(eval $(call BuildPlugin,ha_sphinx,))
  489. $(eval $(call BuildPlugin,ha_spider,))
  490. $(eval $(call BuildPlugin,ha_test_sql_discovery,))
  491. $(eval $(call BuildPlugin,handlersocket,))
  492. $(eval $(call BuildPlugin,libdaemon_example,))
  493. $(eval $(call BuildPlugin,locales,))
  494. $(eval $(call BuildPlugin,metadata_lock_info,))
  495. $(eval $(call BuildPlugin,mypluglib,))
  496. $(eval $(call BuildPlugin,qa_auth_client,))
  497. $(eval $(call BuildPlugin,qa_auth_interface,))
  498. $(eval $(call BuildPlugin,qa_auth_server,))
  499. $(eval $(call BuildPlugin,query_cache_info,))
  500. $(eval $(call BuildPlugin,query_response_time,))
  501. $(eval $(call BuildPlugin,semisync_master,))
  502. $(eval $(call BuildPlugin,semisync_slave,))
  503. $(eval $(call BuildPlugin,server_audit,))
  504. $(eval $(call BuildPlugin,simple_password_check,))
  505. $(eval $(call BuildPlugin,sql_errlog,))
  506. $(eval $(call BuildPlugin,wsrep_info,))