aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJoni Kanerva2012-09-25 11:02:55 +0300
committerAdam Vandenberg2012-09-25 08:22:21 -0700
commitd173f958c7b080f938439ce19cbd66435694ba59 (patch)
treede60b623fac3ee3b8bc11c705fe7d82cb8faad05 /Library
parentef37dff04caa7c0fcdb13ba2b46b5c53cce42fae (diff)
downloadhomebrew-d173f958c7b080f938439ce19cbd66435694ba59.tar.bz2
mariadb: fix shared data dir and my.cnf includedir
Fixes #15071. Closes #15094. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mariadb.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Formula/mariadb.rb b/Library/Formula/mariadb.rb
index e8116cee3..874fa4f11 100644
--- a/Library/Formula/mariadb.rb
+++ b/Library/Formula/mariadb.rb
@@ -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/