]> git.pld-linux.org Git - packages/passenger.git/blob - apache-mod_rails.spec
- added
[packages/passenger.git] / apache-mod_rails.spec
1 %define         apxs    /usr/sbin/apxs
2 %define         mod_name        rails
3 Summary:        A module to bridge Ruby on Rails to Apache
4 Name:           apache-mod_rails
5 Version:        1.0.1
6 Release:        1
7 License:        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
16 BuildRequires:  rake
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)
22
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)
26
27 %description
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”.
32
33 %prep
34 %setup -q -n passenger-%{version}
35 %patch0 -p1
36
37 %build
38 cp %{_datadir}/setup.rb .
39 APXS2=%{apxs} rake
40 ruby setup.rb config --rbdir=%{ruby_rubylibdir} --sodir=%{ruby_archdir}
41 ruby setup.rb setup
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}}
46
47 install ext/apache2/mod_passenger.so $RPM_BUILD_ROOT%{apachelibdir}
48 ruby setup.rb install --prefix=$RPM_BUILD_ROOT
49
50 #install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/75_mod_rails.conf
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 %service -q httpd restart
57
58 %postun
59 if [ "$1" = "0" ]; then
60         %service -q httpd restart
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %doc INSTALL README
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
This page took 0.059025 seconds and 4 git commands to generate.