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