Created
December 15, 2011 09:09
-
-
Save janx/1480455 to your computer and use it in GitHub Desktop.
passenger-httpd.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Rubygem Passenger and its Apache2 module | |
Name: passenger-httpd | |
Version: 3.0.11 | |
Release: 1 | |
Vendor: Socialspring, Inc | |
Group: System Environment/Daemons | |
License: Modified BSD | |
URL: http://www.modrails.com/ | |
Source: http://rubyforge.org/frs/download.php/75548/passenger-3.0.11.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) | |
BuildRequires: ruby >= 1.9.2 | |
BuildRequires: httpd-devel | |
BuildRequires: apr-devel | |
BuildRequires: apr-util-devel | |
BuildRequires: curl-devel | |
Requires: ruby >= 1.9.2 | |
Requires: httpd | |
%description | |
Phusion Passenger™ — a.k.a. mod_rails or mod_rack — makes deployment | |
of Ruby web applications, such as those built on the revolutionary | |
Ruby on Rails web framework, a breeze. It follows the usual Ruby on | |
Rails conventions, such as “Don’t-Repeat-Yourself”. | |
%{?!ruby: %define ruby /usr/bin/ruby} | |
%{?!rake: %define rake /usr/bin/rake} | |
%{?!gem: %define gem /usr/bin/gem} | |
%define debug_package %nil | |
%ifarch x86_64 | |
%define lib_path /usr/lib64 | |
%else | |
%define lib_path /usr/lib | |
%endif | |
%define gem_home %{buildroot}%{lib_path}/ruby/gems/1.9.1 | |
%prep | |
rm -rf $RPM_BUILD_ROOT | |
mkdir -p %{gem_home} | |
%build | |
%install | |
%{gem} install passenger -v %{version} --install-dir %{gem_home} | |
GEM_HOME=%{gem_home} %{gem_home}/bin/passenger-install-apache2-module --auto | |
%post | |
echo "" | |
echo "Please edit your Apache configuration file, and add these lines:" | |
echo "" | |
echo " LoadModule passenger_module %{lib_path}/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/apache2/mod_passenger.so" | |
echo " PassengerRoot %{lib_path}/ruby/gems/1.9.1/gems/passenger-3.0.11" | |
echo " PassengerRuby /usr/bin/ruby" | |
echo "" | |
echo "Suppose you have a Rails application in /somewhere. Add a virtual host to your" | |
echo "Apache configuration file and set its DocumentRoot to /somewhere/public:" | |
echo "" | |
echo " <VirtualHost *:80>" | |
echo " ServerName www.yourhost.com" | |
echo " DocumentRoot /somewhere/public # <-- be sure to point to 'public'!" | |
echo " <Directory /somewhere/public>" | |
echo " AllowOverride all # <-- relax Apache security settings" | |
echo " Options -MultiViews # <-- MultiViews must be turned off" | |
echo " </Directory>" | |
echo " </VirtualHost>" | |
echo "" | |
echo "You may also want to check the Users Guide for security and" | |
echo "optimization tips, troubleshooting and other useful information:" | |
echo "" | |
echo " %{lib_path}/ruby/gems/1.9.1/gems/passenger-3.0.11/doc/Users guide Apache.html" | |
echo "" | |
echo "Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)" | |
echo "http://www.modrails.com/" | |
echo "" | |
%clean | |
%files | |
%docdir %{lib_path}/ruby/gems/1.9.1/doc | |
%{lib_path}/ruby/gems/1.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment