]> git.pld-linux.org Git - packages/passenger.git/blame_incremental - passenger.spec
- removed obsolete patches
[packages/passenger.git] / passenger.spec
... / ...
CommitLineData
1# Conditional build:
2%bcond_with tests # build without tests
3
4Summary: A module to bridge Ruby on Rails to Apache
5Name: passenger
6Version: 4.0.50
7Release: 0.1
8# Passenger code uses MIT license.
9# Bundled(Boost) uses Boost Software License
10# BCrypt and Blowfish files use BSD license.
11# Documentation is CC-BY-SA
12# See: https://bugzilla.redhat.com/show_bug.cgi?id=470696#c146
13License: Boost and BSD and BSD with advertising and MIT and zlib
14Group: Networking/Daemons/HTTP
15Source0: https://github.com/phusion/passenger/archive/release-%{version}.tar.gz
16# Source0-md5: 69c6ade41d870782ae12c3f49d79ce20
17Source1: apache-mod_%{name}.conf
18Patch0: nogems.patch
19Patch1: alias+public.patch
20Patch2: %{name}_apache_fix_autofoo.patch
21Patch3: progs.patch
22URL: https://www.phusionpassenger.com/
23BuildRequires: apache-devel >= 2.0.55-1
24BuildRequires: apache-tools
25BuildRequires: apr-devel >= 1:1.0.0
26BuildRequires: apr-util-devel >= 1:1.0.0
27#BuildRequires: asciidoc
28BuildRequires: curl-devel
29BuildRequires: libev-devel
30BuildRequires: libstdc++-devel
31BuildRequires: openssl-devel
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.559
34BuildRequires: ruby-devel
35BuildRequires: ruby-rake >= 0.8.0
36BuildRequires: ruby-rdoc
37BuildRequires: sed >= 4.0
38BuildRequires: zlib-devel
39%if %(locale -a | grep -q '^en_US$'; echo $?)
40BuildRequires: glibc-localedb-all
41%endif
42Obsoletes: apache-mod_rails-rdoc
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%define apxs /usr/sbin/apxs
46%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
47%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
48
49%description
50Phusion Passenger - a.k.a. mod_passenger - makes deployment of
51applications built on the revolutionary Ruby on Rails web framework a
52breeze. It follows the usual Ruby on Rails conventions, such as
53"Don't-Repeat-Yourself".
54
55%package -n apache-mod_passenger
56Summary: Apache Module for Phusion Passenger
57License: Boost and BSD and BSD with advertising and MIT and zlib
58Group: Daemons
59Requires: %{name} = %{version}-%{release}
60Requires: apache(modules-api) = %apache_modules_api
61Provides: apache(mod_passenger)
62Obsoletes: apache-mod_rails < 4.0
63
64%description -n apache-mod_passenger
65This package contains the pluggable Apache server module for Phusion
66Passenger(tm).
67
68%package -n ruby-passenger-ri
69Summary: ri documentation for Phusion Passenger
70Summary(pl.UTF-8): Dokumentacja w formacie ri dla Phusion Passenger
71Group: Documentation
72Requires: ruby
73Obsoletes: apache-mod_rails-ri < 4.0
74
75%description -n ruby-passenger-ri
76ri documentation for Phusion Passenger
77
78%description -n ruby-passenger-ri -l pl.UTF-8
79Dokumentacji w formacie ri dla Phusion Passenger
80
81%prep
82%setup -q -n %{name}-release-%{version}
83#%patch0 -p1
84#%patch1 -p0
85#%patch2 -p0
86#%patch3 -p1
87
88%{__sed} -i -e 's|#!/usr/bin/env python|#!%{_bindir}/python|' helper-scripts/*.py
89%{__sed} -i -e 's|#!/usr/bin/env ruby|#!%{_bindir}/ruby|' helper-scripts/{prespawn,download_binaries/extconf.rb,*.rb} bin/*
90
91# Don't use bundled libev
92rm -r ext/libev
93
94%build
95export USE_VENDORED_LIBEV=false
96export CC="%{__cc}"
97export CXX="%{__cxx}"
98export CFLAGS="%{rpmcflags} -fno-strict-aliasing"
99export CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing"
100export EXTRA_CFLAGS="%{rpmcflags} -fno-strict-aliasing"
101export EXTRA_CXXFLAGS="%{rpmcxxflags} -fno-strict-aliasing"
102
103export APACHECTL=%{_sbindir}/apachectl
104export HTTPD_VERSION=$(rpm -q apache-devel --qf '%{V}')
105export HTTPD=%{_sbindir}/httpd
106export APXS2=%{apxs}
107
108rake apache2 V=1 \
109 RELEASE=yes \
110 OPTIMIZE=yes
111
112%if %{with tests}
113# Run the tests, capture the output, but don't fail the build if the tests fail
114#
115# This will make the test failure non-critical, but it should be examined
116# anyway.
117sed -i 's|sh "cd test && \./cxx/CxxTestMain"|& rescue true|' build/cxx_tests.rb
118
119# adjust for rspec 2 while the test suite seems to require RSpec 1.
120sed -i \
121 "s|return locate_ruby_tool('spec')|return locate_ruby_tool('rspec')|" \
122 lib/phusion_passenger/platform_info/ruby.rb
123
124rake test --trace
125%endif
126
127# UTF8 locale needed for doc generation
128LC_ALL=en_US.UTF-8 \
129rdoc --ri --op ri lib ext/ruby
130%{__rm} -r ri/{GC,IO,Object,Signal,CommonLibraryBuilder,Exception,DaemonController}
131%{__rm} ri/{cache.ri,created.rid}
132
133%install
134rm -rf $RPM_BUILD_ROOT
135install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{_mandir}/man{1,8}} \
136 $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir},%{ruby_ridir}} \
137 $RPM_BUILD_ROOT%{_bindir} \
138 $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents/apache2 \
139 $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts
140
141install -p buildout/apache2/mod_passenger.so $RPM_BUILD_ROOT%{_pkglibdir}
142cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/75_mod_passenger.conf
143
144install -p buildout/ruby/ruby-*/passenger_native_support.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}
145cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
146
147install -p bin/passenger-{config,memory-stats,status} bin/passenger $RPM_BUILD_ROOT%{_bindir}
148install -p buildout/agents/{PassengerLoggingAgent,PassengerWatchdog,PassengerHelperAgent} $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents
149cp -a helper-scripts/* $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts
150
151cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
152cp -p man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
153cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
154
155%clean
156rm -rf $RPM_BUILD_ROOT
157
158%post -n apache-mod_passenger
159%service -q httpd restart
160
161%postun -n apache-mod_passenger
162if [ "$1" = "0" ]; then
163 %service -q httpd restart
164fi
165
166%files
167%defattr(644,root,root,755)
168%doc README.md INSTALL.md
169%attr(755,root,root) %{_bindir}/passenger
170%attr(755,root,root) %{_bindir}/passenger-config
171%attr(755,root,root) %{_bindir}/passenger-memory-stats
172%attr(755,root,root) %{_bindir}/passenger-status
173%{_mandir}/man1/passenger-config.1*
174%{_mandir}/man8/passenger-memory-stats.8*
175%{_mandir}/man8/passenger-status.8*
176
177%attr(755,root,root) %{ruby_vendorarchdir}/passenger_native_support.so
178%{ruby_vendorlibdir}/phusion_passenger.rb
179%{ruby_vendorlibdir}/phusion_passenger
180
181%dir %{_libdir}/phusion-passenger
182%dir %{_libdir}/phusion-passenger/agents
183%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerHelperAgent
184%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerLoggingAgent
185%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerWatchdog
186%dir %{_datadir}/phusion-passenger
187%dir %{_datadir}/phusion-passenger/helper-scripts
188%attr(755,root,root) %{_datadir}/phusion-passenger/helper-scripts/*
189
190%files -n apache-mod_passenger
191%defattr(644,root,root,755)
192%doc doc/Users?guide?Apache.txt
193%defattr(644,root,root,755)
194%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_passenger.conf
195%attr(755,root,root) %{_pkglibdir}/mod_passenger.so
196
197%files -n ruby-passenger-ri
198%defattr(644,root,root,755)
199%{ruby_ridir}/PhusionPassenger
This page took 0.065299 seconds and 4 git commands to generate.