Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit a286b39

Browse files
committed
Merge pull request #40 from boxen/postgresql-9.4.5
postgresql 9.4.5
2 parents c41edc2 + 1d12692 commit a286b39

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

files/brews/postgresql.rb

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
class Postgresql < Formula
2-
homepage "http://www.postgresql.org/"
2+
desc "Object-relational database system"
3+
homepage "https://www.postgresql.org/"
4+
revision 2
35

46
stable do
5-
url "http://ftp.postgresql.org/pub/source/v9.4.1/postgresql-9.4.1.tar.bz2"
6-
sha256 "29ddb77c820095b8f52e5455e9c6c6c20cf979b0834ed1986a8857b84888c3a6"
7+
url "https://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.bz2"
8+
sha256 "b87c50c66b6ea42a9712b5f6284794fabad0616e6ae420cf0f10523be6d94a39"
79
end
810

9-
version "9.4.1-boxen2"
10-
1111
bottle do
12-
revision 1
13-
sha1 "4b5a1f7ebe10ec5aba088459a4faa2ba7c13a691" => :yosemite
14-
sha1 "e7844fc53d1ffef1cb809332d88b5bb777927176" => :mavericks
15-
sha1 "a5e70e04dba89fee99bb5fb7dae74e4a849813c4" => :mountain_lion
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"
1621
end
1722

1823
option "32-bit"
@@ -40,10 +45,15 @@ class Postgresql < Formula
4045
def install
4146
ENV.libxml2 if MacOS.version >= :snow_leopard
4247

48+
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}"
50+
4351
args = %W[
4452
--disable-debug
4553
--prefix=#{prefix}
46-
--datadir=#{share}/#{name}
54+
--datadir=#{HOMEBREW_PREFIX}/share/postgresql
55+
--libdir=#{HOMEBREW_PREFIX}/lib
56+
--sysconfdir=#{etc}
4757
--docdir=#{doc}
4858
--enable-thread-safety
4959
--with-bonjour
@@ -58,7 +68,7 @@ def install
5868
args << "--with-python" if build.with? "python"
5969
args << "--with-perl" if build.with? "perl"
6070

61-
# The CLT is required to build tcl support on 10.7 and 10.8 because
71+
# The CLT is required to build Tcl support on 10.7 and 10.8 because
6272
# tclConfig.sh is not part of the SDK
6373
if build.with?("tcl") && (MacOS.version >= :mavericks || MacOS::CLT.installed?)
6474
args << "--with-tcl"
@@ -72,11 +82,14 @@ def install
7282
args << "--with-uuid=e2fs"
7383

7484
if build.build_32_bit?
75-
ENV.append %w{CFLAGS LDFLAGS}, "-arch #{Hardware::CPU.arch_32_bit}"
85+
ENV.append %w[CFLAGS LDFLAGS], "-arch #{Hardware::CPU.arch_32_bit}"
7686
end
7787

7888
system "./configure", *args
79-
system "make", "install-world"
89+
system "make"
90+
system "make", "install-world", "datadir=#{pkgshare}",
91+
"libdir=#{lib}",
92+
"pkglibdir=#{lib}/postgresql"
8093
end
8194

8295
def post_install
@@ -91,7 +104,7 @@ def caveats; <<-EOS.undent
91104
https://github.com/Homebrew/homebrew/issues/2510
92105
93106
To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
94-
http://www.postgresql.org/docs/9.4/static/upgrading.html
107+
https://www.postgresql.org/docs/9.4/static/upgrading.html
95108
EOS
96109
end
97110

@@ -127,5 +140,8 @@ def plist; <<-EOS.undent
127140

128141
test do
129142
system "#{bin}/initdb", testpath/"test"
143+
assert_equal "#{HOMEBREW_PREFIX}/share/postgresql", shell_output("#{bin}/pg_config --sharedir").chomp
144+
assert_equal "#{HOMEBREW_PREFIX}/lib", shell_output("#{bin}/pg_config --libdir").chomp
145+
assert_equal "#{HOMEBREW_PREFIX}/lib/postgresql", shell_output("#{bin}/pg_config --pkglibdir").chomp
130146
end
131147
end

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
$port = 15432
1313

1414
$package = 'boxen/brews/postgresql'
15-
$version = '9.4.1-boxen2'
15+
$version = '9.4.5_2'
1616

1717
$service = 'dev.postgresql'
1818

0 commit comments

Comments
 (0)