File rubygem-passenger.spec of Package rubygem-passenger
#
# spec file for package rubygem-passenger (Version 1.0.0)
#
# Copyright (c) 2007-2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: rubygem-passenger
Version: 2.0.5
Release: 0
%define mod_name passenger
%define apxs /usr/sbin/apxs2
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
%if 0%{?suse_version} > 1100
%define with_system_boost 1
%endif
#
Group: Development/Languages/Ruby
License: MIT GPLv2
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: rubygems_with_buildroot_patch
BuildRequires: ruby-devel >= 1.8.5
Requires: rubygems >= 0.9
BuildRequires: rubygem-rake >= 0.8.1
Requires: rubygem-rake >= 0.8.1
BuildRequires: rubygem-rack >= 0.3.0
Requires: rubygem-rack >= 0.3.0
BuildRequires: rubygem-fastthread >= 1.0.1
Requires: rubygem-fastthread >= 1.0.1
BuildRequires: apache2-devel boost-devel gcc-c++
BuildRequires: fdupes
#
URL: http://www.modrails.com/
# http://rubyforge.org/projects/passenger/
Source: http://rubyforge.org/frs/download.php/47929/passenger-2.0.5.gem
Source1: rubygem-passenger-2.0.5_system_boost.patch
Source2: rubygem-passenger-2.0.5_boost_exception.patch
Source3: rubygem-passenger-2.0.5_missing_includes.patch
#
Summary: Apache module for Ruby on Rails support
%description
Passenger is an Apache module for Ruby on Rails support.
Authors:
--------
Phusion - http://www.phusion.nl/
%prep
%build
%install
%gem_install %{S:0}
pushd %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%if 0%{?with_system_boost}
rm -rv ext/boost
patch -p0 < %{S:1}
%endif
patch -p0 < %{S:2}
patch -p0 < %{S:3}
export PATH="%{_sbindir}:$PATH"
rake apache2
%{__install} -D -m 0755 ext/apache2/mod_passenger.so %{buildroot}%{apache_libexecdir}/mod_passenger.so
%{__install} -D -m 0755 ext/apache2/ApplicationPoolServerExecutable %{buildroot}%{_prefix}/lib/passenger/ApplicationPoolServerExecutable
%{__rm} -vf ext/apache2/mod_passenger.so ext/apache2/ApplicationPoolServerExecutable ext/passenger/native_support.so ext/boost/src/libboost_thread.a
popd
%gem_cleanup
#find %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/ -name dispatch.\* -print0 | \
# xargs -r0 ruby -p -i -e 'gsub(%r{#!.*/bin/ruby}, "#!/usr/bin/ruby")'
%fdupes %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%{__rm} %{buildroot}%{_bindir}/passenger-install-apache2-module
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/passenger-spawn-server
%{_bindir}/passenger-config
%{_bindir}/passenger-memory-stats
%{_bindir}/passenger-make-enterprisey
%{_bindir}/passenger-status
%{_bindir}/passenger-stress-test
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_name}-%{version}.gem
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_name}-%{version}.gemspec
%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_name}-%{version}/
#files -n apache2-mod_passenger
#defattr(-,root,root,-)
%dir %{_prefix}/lib/passenger/
%{_prefix}/lib/passenger/ApplicationPoolServerExecutable
%{apache_libexecdir}/mod_passenger.so
%changelog