1 %define apxs /usr/sbin/apxs
3 Summary: A module to bridge Ruby on Rails to Apache
8 Group: Networking/Daemons
9 Source0: http://rubyforge.org/frs/download.php/35309/passenger-%{version}.tar.gz
10 # Source0-md5: 82df07de03c4d57bc2dfc6393bcb7687
11 #Source1: %{name}.conf
12 Patch0: %{name}-buildfix.patch
13 URL: http://www.modrails.com
14 BuildRequires: apache-devel >= 2.0.55-1
15 BuildRequires: apr-util-devel >= 1:1.0.0
17 BuildRequires: rpmbuild(macros) >= 1.268
18 BuildRequires: ruby-devel
19 BuildRequires: setup.rb
20 Provides: apache(mod_rails)
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 # TODO: separate -devel with ExtUtils::Embed and friends?
24 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
25 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 Phusion Passenger — a.k.a. mod_rails — makes deployment of
29 applications built on the revolutionary Ruby on Rails web framework a
30 breeze. It follows the usual Ruby on Rails conventions, such as
31 “Don’t-Repeat-Yourself”.
34 %setup -q -n passenger-%{version}
38 cp %{_datadir}/setup.rb .
40 ruby setup.rb config --rbdir=%{ruby_rubylibdir} --sodir=%{ruby_archdir}
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}}
47 install ext/apache2/mod_passenger.so $RPM_BUILD_ROOT%{apachelibdir}
48 ruby setup.rb install --prefix=$RPM_BUILD_ROOT
50 #install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/75_mod_rails.conf
53 rm -rf $RPM_BUILD_ROOT
56 %service -q httpd restart
59 if [ "$1" = "0" ]; then
60 %service -q httpd restart
64 %defattr(644,root,root,755)
66 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*.conf
67 %attr(755,root,root) %{apachelibdir}/*.so
68 %attr(755,root,root) %{_bindir}/passenger-spawn-server
69 %{ruby_rubylibdir}/passenger