diff --git a/attributes/default.rb b/attributes/default.rb index d1b3014..ae346da 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -6,6 +6,7 @@ default[:sphinx][:use_stemmer] = false default[:sphinx][:use_mysql] = false default[:sphinx][:use_percona] = false +default[:sphinx][:use_mariadb] = false default[:sphinx][:use_postgres] = false # Source Installation Settings diff --git a/recipes/default.rb b/recipes/default.rb index 51a0a8f..64b1b4a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,4 +1,5 @@ include_recipe "percona::client" if node[:sphinx][:use_percona] include_recipe "mysql::client" if node[:sphinx][:use_mysql] +include_recipe "mariadb::client" if node[:sphinx][:use_mariadb] include_recipe "postgresql::client" if node[:sphinx][:use_postgres] include_recipe "sphinx::#{node[:sphinx][:install_method]}" diff --git a/recipes/source.rb b/recipes/source.rb index b74bf04..bb738ab 100644 --- a/recipes/source.rb +++ b/recipes/source.rb @@ -25,8 +25,8 @@ end # Install required dependency when building from source -# against Percona server -if node[:sphinx][:use_percona] +# against Percona and MariaDB servers +if (node[:sphinx][:use_percona] or node[:sphinx][:use_mariadb]) case node[:platform_family] when 'debian' package 'libssl-dev' @@ -58,7 +58,7 @@ "--prefix=#{node[:sphinx][:source][:install_path]}", "--bindir=#{node[:sphinx][:source][:binary_path]}", node[:sphinx][:use_stemmer] ? '--with-libstemmer' : '--without-libstemmer', - (node[:sphinx][:use_mysql] or node[:sphinx][:use_percona]) ? '--with-mysql' : '--without-mysql', + (node[:sphinx][:use_mysql] or node[:sphinx][:use_percona] or node[:sphinx][:use_mariadb]) ? '--with-mysql' : '--without-mysql', node[:sphinx][:use_postgres] ? '--with-pgsql' : '--without-pgsql' ] end