mariadb: fix shared data dir and my.cnf includedir

Fixes Homebrew/homebrew#15071.
Closes Homebrew/homebrew#15094.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Joni Kanerva 2012-09-25 11:02:55 +03:00 committed by Adam Vandenberg
parent 527076288e
commit 938fa1d1f7
1 changed files with 8 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class Mariadb < Formula
-DMYSQL_DATADIR=#{var}/mysql
-DINSTALL_MANDIR=#{man}
-DINSTALL_DOCDIR=#{doc}
-DINSTALL_MYSQLSHAREDIR=#{share.basename}/#{name}
-DINSTALL_MYSQLSHAREDIR=#{share.basename}/mysql
-DWITH_SSL=yes
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
@ -94,13 +94,19 @@ class Mariadb < Formula
# pidof can be replaced with pgrep from proctools on Mountain Lion
s.gsub!(/pidof/, 'pgrep') if MacOS.version >= :mountain_lion
end
# Fix my.cnf to point to #{etc} instead of /etc
inreplace "#{etc}/my.cnf" do |s|
s.gsub!("!includedir /etc/my.cnf.d", "!includedir #{etc}/my.cnf.d")
end
ln_s "#{prefix}/support-files/mysql.server", bin
end
def caveats; <<-EOS.undent
Set up databases with:
unset TMPDIR
mysql_install_db
mysql_install_db --user=\`whoami\` --basedir="$(brew --prefix mariadb)" --datadir=#{var}/mysql --tmpdir=/tmp
If this is your first install, automatically load on login with:
cp #{plist_path} ~/Library/LaunchAgents/