2011-09-06 19:46:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GearmanPhp < Formula
|
|
|
|
url 'http://pecl.php.net/get/gearman-0.8.0.tgz'
|
|
|
|
homepage 'http://pecl.php.net/package/gearman'
|
|
|
|
md5 '43fd69b1710ddb17af59c91ddeb32cb1'
|
|
|
|
|
2011-09-26 19:57:56 +00:00
|
|
|
depends_on 'gearman'
|
2011-09-06 19:46:24 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
Dir.chdir "gearman-#{version}" do
|
|
|
|
system "phpize"
|
2012-02-06 19:27:34 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-gearman=#{Formula.factory('gearman').prefix}"
|
2011-09-06 19:46:24 +00:00
|
|
|
system "make"
|
|
|
|
prefix.install 'modules/gearman.so'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To finish installing gearman:
|
|
|
|
* Add the following line to php.ini:
|
|
|
|
extension="#{prefix}/gearman.so"
|
|
|
|
* Restart your webserver
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|