aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLifepillar2013-02-27 22:52:58 +0100
committerAdam Vandenberg2013-05-25 16:52:13 -0700
commita5bd30b8dccaacdd9990c1ec6b445f3cd37122fc (patch)
treec28eefd377915db1f955bc5bb90df9ce8fcacb75
parente19e23bdef1ee48a9fc5b3d95997044b5c4a2fe2 (diff)
downloadhomebrew-a5bd30b8dccaacdd9990c1ec6b445f3cd37122fc.tar.bz2
pgtune 0.9.3
Closes #18120. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/pgtune.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/pgtune.rb b/Library/Formula/pgtune.rb
new file mode 100644
index 000000000..18fd2eff4
--- /dev/null
+++ b/Library/Formula/pgtune.rb
@@ -0,0 +1,22 @@
+require 'formula'
+
+class Pgtune < Formula
+ homepage 'http://pgfoundry.org/projects/pgtune'
+ url 'http://pgfoundry.org/frs/download.php/2449/pgtune-0.9.3.tar.gz'
+ sha1 'c638ee3be7bd33f313c280cff9dee2d47bb40e46'
+
+ # 0.9.3 does not have settings for PostgreSQL 9.x, but the trunk does
+ head 'https://github.com/gregs1104/pgtune.git', :branch => 'master'
+
+ def install
+ # By default, pgtune searches for settings in the directory
+ # where the script is being run from. We replace the default
+ # path with pgtune_share.
+ pgtune_share = share/'pgtune'
+ inreplace 'pgtune' do |s|
+ s.sub! /(parser\.add_option\('-S'.*default=).*,/, "\\1\"#{pgtune_share}\","
+ end
+ bin.install 'pgtune'
+ pgtune_share.install Dir['pg_settings*']
+ end
+end