buildout.cfg 5.1 KB
# MariaDB - a database server that offers drop-in replacement functionality for MySQL.
# http://mariadb.org/

[buildout]
extends =
  ../binutils/buildout.cfg
  ../bzip2/buildout.cfg
  ../cmake/buildout.cfg
  ../groonga/buildout.cfg
  ../jemalloc/buildout.cfg
  ../libaio/buildout.cfg
  ../libxml2/buildout.cfg
  ../lz4/buildout.cfg
  ../ncurses/buildout.cfg
  ../openssl/buildout.cfg
  ../patch/buildout.cfg
  ../pcre/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../readline/buildout.cfg
  ../snappy/buildout.cfg
  ../xz-utils/buildout.cfg
  ../zlib/buildout.cfg
  ../unixodbc/buildout.cfg
  ../gcc/buildout.cfg
  ../zstd/buildout.cfg

parts =
  mariadb

[mariadb]
recipe = slapos.recipe.cmmi
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve
version = 10.4.12
md5sum = 97d7c0f508c04a31c138fdb24e95dbc4
location = ${buildout:parts-directory}/${:_buildout_section_name_}
pre-configure =
  set -e '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake
  grep -q "$@"
  sed -i "/$1/d" "$2"
configure-command = ${cmake:location}/bin/cmake
configure-options =
  -DCMAKE_INSTALL_PREFIX=${:location}
  -DBUILD_CONFIG=mysql_release
  -DDEFAULT_CHARSET=utf8
  -DDEFAULT_COLLATION=utf8_unicode_ci
  -DWITH_SSL=system
  -DWITH_ZLIB=system
  -DWITH_READLINE=0
  -DWITH_PIC=1
  -DWITH_PCRE=system
  -DENABLE_DTRACE=0
  -DWITH_EXTRA_CHARSETS=complex
  -DWITH_EMBEDDED_SERVER=0
  -DWITH_JEMALLOC=yes
  -DWITH_INNODB_BZIP2=ON
  -DWITH_INNODB_LZ4=ON
  -DWITH_INNODB_LZMA=ON
  -DWITH_INNODB_SNAPPY=ON
  -DWITH_ROCKSDB_LZ4=ON
  -DWITH_ROCKSDB_snappy=ON
  -DWITH_ROCKSDB_ZSTD=ON
  -DWITH_SAFEMALLOC=OFF
  -DPLUGIN_DAEMON_EXAMPLE=NO
  -DPLUGIN_EXAMPLE=NO
  -DPLUGIN_MROONGA=NO
  -DCMAKE_C_FLAGS="${:CMAKE_CFLAGS}"
  -DCMAKE_CXX_FLAGS="${:CMAKE_CFLAGS}"
  -DCMAKE_INSTALL_RPATH=${:CMAKE_LIBRARY_PATH}
  -DCMAKE_INCLUDE_PATH=${unixodbc:location}/include
  -DCMAKE_LIBRARY_PATH=${unixodbc:location}/lib
  -DCMAKE_C_COMPILER=${gcc:location}/bin/gcc
  -DCMAKE_CXX_COMPILER=${gcc:location}/bin/g++
CMAKE_CFLAGS = -I${bzip2:location}/include -I${jemalloc:location}/include -I${libaio:location}/include -I${libxml2:location}/include -I${ncurses:location}/include -I${openssl:location}/include -I${pcre:location}/include -I${readline5:location}/include -I${xz-utils:location}/include -I${zlib:location}/include -I${unixodbc:location}/include -I${lz4:location}/include -I${snappy:location}/include -I${zstd:location}/include
CMAKE_LIBRARY_PATH = ${bzip2:location}/lib:${jemalloc:location}/lib:${libaio:location}/lib:${libxml2:location}/lib:${ncurses:location}/lib:${openssl:location}/lib:${pcre:location}/lib:${readline5:location}/lib:${xz-utils:location}/lib:${zlib:location}/lib:${unixodbc:location}/lib:${lz4:location}/lib:${snappy:location}/lib:${zstd:location}/lib:${gcc:location}/lib:${gcc:location}/lib64
environment =
  CMAKE_PROGRAM_PATH=${cmake:location}/bin
  CMAKE_INCLUDE_PATH=${bzip2:location}/include:${libaio:location}/include:${libaio:location}/include:${libxml2:location}/include:${ncurses:location}/include:${openssl:location}/include:${pcre:location}/include:${readline5:location}/include:${xz-utils:location}/include:${zlib:location}/include:${unixodbc:location}/include:${lz4:location}/include:${snappy:location}/include:${zstd:location}/include
  CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH}
  LDFLAGS=-L${bzip2:location}/lib -L${jemalloc:location}/lib -L${libaio:location}/lib -L${pcre:location}/lib -L${xz-utils:location}/lib -L${zlib:location}/lib -L${unixodbc:location}/lib -L${lz4:location}/lib -L${snappy:location}/lib -L${zstd:location}/lib
  PATH=${patch:location}/bin:%(PATH)s
patch-options = -p1
patches =
  https://sources.debian.org/data/main/m/mariadb-10.3/1:10.3.22-0+deb10u1/debian/patches/0024-Revert-to-using-system-pcre-library.patch#1c6a0f2634f5a56122299674b77b1131
post-install = set -e
  set -- wsrep-lib/wsrep-API/*/wsrep_api.h
  install -DpT $1 ${:location}/$1
  cp -a wsrep-lib/include ${:location}/wsrep-lib

[mroonga-mariadb]
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = slapos.recipe.cmmi
url = https://packages.groonga.org/source/mroonga/mroonga-9.12.tar.gz
md5sum = d0af673f1bad3b9ccf33870bb2344a25
pre-configure = set -e
  rm -rf fake_mariadb_source
  mkdir -p fake_mariadb_source
  cd fake_mariadb_source
  ln -s ${mariadb:location}/wsrep-lib
  cp -a ${mariadb:location}/include/mysql/server include
  mv include/private sql
configure-options =
  --with-mysql-source=fake_mariadb_source
  --with-mysql-config=${mariadb:location}/bin/mysql_config
  --disable-static
  --disable-document
install-sql = @@LOCATION@@/share/mroonga/install.sql
patch-options = -p1
patches =
  ${:_profile_base_location_}/mroonga_boolean.patch#c818568fe35ca6a4298f18e575d962a0
environment =
  PATH=${binutils:location}/bin:${groonga:location}/bin:${patch:location}/bin:${pkgconfig:location}/bin:%(PATH)s
  CPPFLAGS=-I${groonga:location}/include/groonga -I${pcre:location}/include
  LDFLAGS=-L${groonga:location}/lib
  PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig:${groonga-normalizer-mysql:location}/lib/pkgconfig