aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/passenger.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/Library/Formula/passenger.rb b/Library/Formula/passenger.rb
index b7a73a048..dd87f8ab9 100644
--- a/Library/Formula/passenger.rb
+++ b/Library/Formula/passenger.rb
@@ -12,26 +12,31 @@ class Passenger < Formula
def install
rake "apache2"
rake "nginx"
- cp_r Dir["*"], prefix, :preserve => true
+
+ necessary_files = Dir["configure", "Rakefile", "README.md", "CONTRIBUTORS",
+ "CONTRIBUTING.md", "LICENSE", "INSTALL.md", "NEWS", "passenger.gemspec",
+ "build", "lib", "bin", "doc", "man", "helper-scripts", "ext",
+ "resources", "buildout"]
+ libexec.mkpath
+ cp_r necessary_files, libexec, :preserve => true
# The various scripts in bin cannot correctly locate their root directory
# when invoked as symlinks in /usr/local/bin. We create wrapper scripts
# to solve this problem.
- mv bin, libexec
- mkdir bin
- Dir[libexec/"*"].each do |orig_script|
+ bin.mkpath
+ Dir[libexec/"bin/*"].each do |orig_script|
name = File.basename(orig_script)
(bin/name).write <<-EOS.undent
#!/bin/sh
exec #{orig_script} "$@"
EOS
end
- mv prefix/'man', share
+ mv libexec/'man', share
end
def caveats; <<-EOS.undent
To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
- LoadModule passenger_module #{opt_prefix}/buildout/apache2/mod_passenger.so
+ LoadModule passenger_module #{opt_prefix}/libexec/buildout/apache2/mod_passenger.so
PassengerRoot #{opt_prefix}
PassengerDefaultRuby /usr/bin/ruby
@@ -41,7 +46,7 @@ class Passenger < Formula
end
test do
- if `#{HOMEBREW_PREFIX}/bin/passenger-config --root`.strip != prefix.to_s
+ if `#{HOMEBREW_PREFIX}/bin/passenger-config --root`.strip != libexec.to_s
raise "Invalid root path"
end
end