]>
Commit | Line | Data |
---|---|---|
cf570175 | 1 | %define gem_name passenger |
a6dd913b | 2 | Summary: A module to bridge Ruby on Rails to Apache |
3 | Name: apache-mod_rails | |
cf570175 | 4 | Version: 3.0.19 |
2423fa08 | 5 | Release: 0.4 |
cf570175 ER |
6 | # Passenger code uses MIT license. |
7 | # Bundled(Boost) uses Boost Software License | |
8 | # BCrypt and Blowfish files use BSD license. | |
9 | # Documentation is CC-BY-SA | |
10 | # See: https://bugzilla.redhat.com/show_bug.cgi?id=470696#c146 | |
11 | License: Boost and BSD and BSD with advertising and MIT and zlib | |
c3715c90 | 12 | Group: Networking/Daemons/HTTP |
cf570175 | 13 | Source0: https://github.com/FooBarWidget/passenger/archive/release-%{version}.tar.gz |
2a03dcd6 | 14 | Source1: %{name}.conf |
9ffe5700 | 15 | Patch0: %{name}-nogems.patch |
26446e83 | 16 | Patch1: %{name}-alias+public.patch |
f41b67ce | 17 | Patch2: passenger_apache_fix_autofoo.patch |
2423fa08 | 18 | Patch3: progs.patch |
d25d580b | 19 | URL: http://www.modrails.com/ |
a6dd913b | 20 | BuildRequires: apache-devel >= 2.0.55-1 |
26446e83 | 21 | BuildRequires: apr-devel >= 1:1.0.0 |
a6dd913b | 22 | BuildRequires: apr-util-devel >= 1:1.0.0 |
4e15a504 | 23 | #BuildRequires: asciidoc |
681e9caf | 24 | BuildRequires: curl-devel |
2b222840 | 25 | BuildRequires: libev-devel |
76045959 | 26 | BuildRequires: libstdc++-devel |
26446e83 | 27 | BuildRequires: openssl-devel |
76045959 | 28 | BuildRequires: rpm-pythonprov |
fe9ba373 | 29 | BuildRequires: rpmbuild(macros) >= 1.559 |
a6dd913b | 30 | BuildRequires: ruby-devel |
50225bc6 | 31 | BuildRequires: ruby-rake >= 0.8.0 |
2423fa08 | 32 | BuildRequires: ruby-rdoc |
6cb57b65 | 33 | BuildRequires: sed >= 4.0 |
26446e83 | 34 | BuildRequires: zlib-devel |
fe9ba373 | 35 | %requires_ge_to ruby ruby-devel |
d833e7f5 | 36 | Requires: apache(modules-api) = %apache_modules_api |
a6dd913b | 37 | Provides: apache(mod_rails) |
4e15a504 | 38 | Obsoletes: apache-mod_rails-rdoc |
a6dd913b | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
d25d580b | 41 | %define apxs /usr/sbin/apxs |
d833e7f5 ER |
42 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
43 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
44 | ||
a6dd913b | 45 | %description |
46 | Phusion Passenger — a.k.a. mod_rails — makes deployment of | |
47 | applications built on the revolutionary Ruby on Rails web framework a | |
48 | breeze. It follows the usual Ruby on Rails conventions, such as | |
0a3f766b | 49 | "Don’t-Repeat-Yourself". |
a6dd913b | 50 | |
2a03dcd6 | 51 | %package ri |
0a3f766b ER |
52 | Summary: ri documentation for Apache mod_rails |
53 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla Apache mod_rails | |
2a03dcd6 JR |
54 | Group: Documentation |
55 | Requires: ruby | |
56 | ||
57 | %description ri | |
0a3f766b | 58 | ri documentation for Apache mod_rails. |
2a03dcd6 JR |
59 | |
60 | %description ri -l pl.UTF-8 | |
0a3f766b | 61 | Dokumentacji w formacie ri dla Apache mod_rails. |
2a03dcd6 | 62 | |
a6dd913b | 63 | %prep |
cf570175 | 64 | %setup -q -n %{gem_name}-release-%{version} |
9ffe5700 | 65 | %patch0 -p1 |
26446e83 | 66 | %patch1 -p0 |
f41b67ce | 67 | %patch2 -p0 |
2423fa08 | 68 | %patch3 -p1 |
2a03dcd6 | 69 | |
2b222840 ER |
70 | # Don't use bundled libev |
71 | rm -r ext/libev | |
72 | ||
a6dd913b | 73 | %build |
2b222840 | 74 | USE_VENDORED_LIBEV=false \ |
d211a771 | 75 | rake apache2 V=1 \ |
26446e83 JR |
76 | RELEASE=yes \ |
77 | OPTIMIZE=yes \ | |
2423fa08 | 78 | APACHECTL=%{_sbindir}/apachectl \ |
26446e83 | 79 | APXS2=%{apxs} \ |
2423fa08 ER |
80 | HTTPD=foo \ |
81 | HTTPD_VERSION=$(rpm -q apache-devel --qf '%{V}') \ | |
d211a771 ER |
82 | CC="%{__cc}" \ |
83 | CXX="%{__cxx}" \ | |
26446e83 | 84 | CFLAGS="%{rpmcflags}" \ |
d211a771 | 85 | CXXFLAGS="%{rpmcxxflags}" |
2a03dcd6 | 86 | |
26446e83 JR |
87 | rdoc --ri --op ri lib ext/ruby |
88 | %{__rm} -r ri/{ConditionVariable,Exception,GC,IO,Object,Process,Signal} | |
89 | %{__rm} ri/{cache.ri,created.rid} | |
a6dd913b | 90 | |
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
d833e7f5 | 93 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{_mandir}/man{1,8}} \ |
d25d580b | 94 | $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir},%{ruby_ridir}} \ |
681e9caf | 95 | $RPM_BUILD_ROOT%{_bindir} \ |
681e9caf | 96 | $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents/apache2 \ |
97 | $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts | |
a6dd913b | 98 | |
d833e7f5 | 99 | install -p ext/apache2/mod_passenger.so $RPM_BUILD_ROOT%{_pkglibdir} |
d25d580b | 100 | install -p ext/ruby/ruby-*/passenger_native_support.so $RPM_BUILD_ROOT%{ruby_vendorarchdir} |
d833e7f5 ER |
101 | install -p bin/passenger-{config,memory-stats,status} bin/passenger $RPM_BUILD_ROOT%{_bindir} |
102 | install -p agents/PassengerLoggingAgent agents/PassengerWatchdog $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents | |
103 | install -p agents/apache2/PassengerHelperAgent $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents/apache2 | |
104 | install -p helper-scripts/* $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts | |
d25d580b | 105 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
d833e7f5 ER |
106 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
107 | cp -p man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
2a03dcd6 | 108 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
d833e7f5 | 109 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/75_mod_rails.conf |
a6dd913b | 110 | |
e73e14e7 JR |
111 | %{__sed} -i -e 's|#!/usr/bin/env ruby|#!%{_bindir}/ruby|' \ |
112 | $RPM_BUILD_ROOT%{_bindir}/passenger \ | |
113 | $RPM_BUILD_ROOT%{_bindir}/passenger-* \ | |
114 | $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts/* | |
115 | ||
116 | %{__sed} -i -e 's|#!/usr/bin/env python|#!%{_bindir}/python|' \ | |
d25d580b | 117 | $RPM_BUILD_ROOT%{ruby_vendorlibdir}/phusion_passenger/wsgi/request_handler.py |
e73e14e7 | 118 | |
a6dd913b | 119 | %clean |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post | |
123 | %service -q httpd restart | |
124 | ||
125 | %postun | |
126 | if [ "$1" = "0" ]; then | |
127 | %service -q httpd restart | |
128 | fi | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
cf570175 ER |
132 | %doc INSTALL README |
133 | #%doc doc/{A*.txt,Security*.txt,*Apache.txt} | |
134 | #%doc doc/{A*.html,Security*.html,*Apache.html,images} | |
d833e7f5 ER |
135 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_rails.conf |
136 | %attr(755,root,root) %{_pkglibdir}/mod_passenger.so | |
e73e14e7 | 137 | %attr(755,root,root) %{_bindir}/passenger |
d833e7f5 ER |
138 | %attr(755,root,root) %{_bindir}/passenger-config |
139 | %attr(755,root,root) %{_bindir}/passenger-memory-stats | |
140 | %attr(755,root,root) %{_bindir}/passenger-status | |
d25d580b ER |
141 | %{_mandir}/man1/passenger-config.1* |
142 | %{_mandir}/man1/passenger-stress-test.1* | |
143 | %{_mandir}/man8/passenger-memory-stats.8* | |
144 | %{_mandir}/man8/passenger-status.8* | |
145 | ||
146 | %attr(755,root,root) %{ruby_vendorarchdir}/passenger_native_support.so | |
147 | %{ruby_vendorlibdir}/phusion_passenger.rb | |
148 | %{ruby_vendorlibdir}/phusion_passenger | |
149 | ||
681e9caf | 150 | %dir %{_libdir}/phusion-passenger |
151 | %dir %{_libdir}/phusion-passenger/agents | |
d833e7f5 ER |
152 | %attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerLoggingAgent |
153 | %attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerWatchdog | |
681e9caf | 154 | %dir %{_libdir}/phusion-passenger/agents/apache2 |
155 | %attr(755,root,root) %{_libdir}/phusion-passenger/agents/apache2/Passenger* | |
681e9caf | 156 | %dir %{_datadir}/phusion-passenger |
157 | %dir %{_datadir}/phusion-passenger/helper-scripts | |
158 | %attr(755,root,root) %{_datadir}/phusion-passenger/helper-scripts/* | |
2a03dcd6 | 159 | |
2a03dcd6 JR |
160 | %files ri |
161 | %defattr(644,root,root,755) | |
162 | %{ruby_ridir}/PhusionPassenger |