11class Postgresql < Formula
22 desc "Object-relational database system"
33 homepage "https://www.postgresql.org/"
4- revision 2
5-
6- stable do
7- url "https://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.bz2"
8- sha256 "b87c50c66b6ea42a9712b5f6284794fabad0616e6ae420cf0f10523be6d94a39"
9- end
4+ url "https://ftp.postgresql.org/pub/source/v9.5.2/postgresql-9.5.2.tar.bz2"
5+ sha256 "f8d132e464506b551ef498719f18cfe9d777709c7a1589dc360afc0b20e47c41"
106
117 bottle do
12- sha256 "b57a3b65cd90917273d754f2625a83e69eac78aeff5b79573f8ac9811bdf643c" => :el_capitan
13- sha256 "6b26ad24a228620e16d7f81b4f3bd183a80e1c2f02b8505a1a6b71356eec53a4" => :yosemite
14- sha256 "a6a49e234543bb7c4fb33b64dd14b48da5b8373fb2110d62e82d7129997f4926" => :mavericks
15- end
16-
17- devel do
18- url "https://ftp.postgresql.org/pub/source/v9.5beta1/postgresql-9.5beta1.tar.bz2"
19- sha256 "b53199e2667982de2039ad7e30467f67c5d7af678e69d6211de8ba1cac75c9f0"
20- version "9.5beta1"
8+ revision 1
9+ sha256 "12bc2c22b06aaa82f577c14a667805a6e8aed9065a3a376e324393afdf6b62f0" => :el_capitan
10+ sha256 "5e7ee10a23edb6ee985f49a969894133939a20eaeee2f2841cb8be82c2f79c74" => :yosemite
11+ sha256 "e6673530167899750d5f2eaaebe53e7ff8b10caada449aef39d66a1af39cfe49" => :mavericks
2112 end
2213
2314 option "32-bit"
@@ -46,7 +37,7 @@ def install
4637 ENV . libxml2 if MacOS . version >= :snow_leopard
4738
4839 ENV . prepend "LDFLAGS" , "-L#{ Formula [ "openssl" ] . opt_lib } -L#{ Formula [ "readline" ] . opt_lib } "
49- ENV . prepend "CPPLAGS " , "-I#{ Formula [ "openssl" ] . opt_include } -I#{ Formula [ "readline" ] . opt_include } "
40+ ENV . prepend "CPPFLAGS " , "-I#{ Formula [ "openssl" ] . opt_include } -I#{ Formula [ "readline" ] . opt_include } "
5041
5142 args = %W[
5243 --disable-debug
@@ -93,7 +84,8 @@ def install
9384 end
9485
9586 def post_install
96- unless File . exist? "#{ var } /postgres"
87+ ( var /"postgres" ) . mkpath
88+ unless File . exist? "#{ var } /postgres/PG_VERSION"
9789 system "#{ bin } /initdb" , "#{ var } /postgres"
9890 end
9991 end
@@ -103,8 +95,14 @@ def caveats; <<-EOS.undent
10395 you may need to remove the previous version first. See:
10496 https://github.com/Homebrew/homebrew/issues/2510
10597
106- To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
107- https://www.postgresql.org/docs/9.4/static/upgrading.html
98+ To migrate existing data from a previous major version (pre-9.0) of PostgreSQL, see:
99+ https://www.postgresql.org/docs/9.5/static/upgrading.html
100+
101+ To migrate existing data from a previous minor version (9.0-9.4) of PosgresSQL, see:
102+ https://www.postgresql.org/docs/9.5/static/pgupgrade.html
103+
104+ You will need your previous PostgreSQL installation from brew to perform `pg_upgrade`.
105+ Do not run `brew cleanup postgresql` until you have performed the migration.
108106 EOS
109107 end
110108
0 commit comments