]> git.pld-linux.org Git - packages/passenger.git/blob - apache-mod_rails.spec
- up to 1.0.5
[packages/passenger.git] / apache-mod_rails.spec
1 #
2 # TODO:
3 # - separate -devel with ExtUtils::Embed and friends?
4 # - how to pass CXXFLAGS to Rakefile?
5
6 %define         apxs    /usr/sbin/apxs
7 %define         mod_name        rails
8 %define         apacheconfdir   %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
9 %define         apachelibdir    %(%{apxs} -q LIBEXECDIR 2>/dev/null)
10
11 Summary:        A module to bridge Ruby on Rails to Apache
12 Name:           apache-mod_rails
13 Version:        1.0.5
14 Release:        1
15 License:        Apache
16 Group:          Networking/Daemons
17 Source0:        http://rubyforge.org/frs/download.php/36739/passenger-%{version}.tar.gz
18 # Source0-md5:  28cf289ae1d0fa93cd077deedca35e76
19 #Source1:       %{name}.conf
20 #Patch0: %{name}-buildfix.patch
21 URL:            http://www.modrails.com
22 BuildRequires:  apache-base >= 2.0.55-1
23 BuildRequires:  apache-devel >= 2.0.55-1
24 BuildRequires:  apache-tools >= 2.0.55-1
25 BuildRequires:  apr-util-devel >= 1:1.0.0
26 BuildRequires:  pkgconfig
27 BuildRequires:  rake
28 BuildRequires:  rpmbuild(macros) >= 1.268
29 BuildRequires:  ruby-RubyGems
30 BuildRequires:  ruby-devel
31 BuildRequires:  sed >= 4.0
32 BuildRequires:  setup.rb
33 Provides:       apache(mod_rails)
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Phusion Passenger — a.k.a. mod_rails — makes deployment of
38 applications built on the revolutionary Ruby on Rails web framework a
39 breeze. It follows the usual Ruby on Rails conventions, such as
40 “Don’t-Repeat-Yourself”.
41
42 %prep
43 %setup -q -n passenger-%{version}
44 #%patch0 -p1
45
46 # TODO : ugly metod - but works
47 %{__sed} -i 's/CXXFLAGS = "/CXXFLAGS = "`pkg-config --cflags apr-util-1`/ ' Rakefile
48
49 %build
50 cp %{_datadir}/setup.rb .
51 APXS2=%{apxs} rake
52 ruby setup.rb config --rbdir=%{ruby_rubylibdir} --sodir=%{ruby_archdir}
53 ruby setup.rb setup
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}}
58
59 install ext/apache2/mod_passenger.so $RPM_BUILD_ROOT%{apachelibdir}
60 ruby setup.rb install --prefix=$RPM_BUILD_ROOT
61
62 #install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/75_mod_rails.conf
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 %service -q httpd restart
69
70 %postun
71 if [ "$1" = "0" ]; then
72         %service -q httpd restart
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc INSTALL README
78 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*.conf
79 %attr(755,root,root) %{apachelibdir}/*.so
80 %attr(755,root,root) %{_bindir}/passenger-*
81 %{ruby_rubylibdir}/passenger
This page took 0.06274 seconds and 3 git commands to generate.