diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2008-04-25 10:56:34 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2008-04-25 10:56:34 +0000 |
commit | 60b816458fb402630b5e1b835890b7bb39b4da08 (patch) | |
tree | 7cd699eb2a75cca6196427725bc7e968c14160c7 /www-apache | |
parent | initial import (diff) | |
download | historical-60b816458fb402630b5e1b835890b7bb39b4da08.tar.gz historical-60b816458fb402630b5e1b835890b7bb39b4da08.tar.bz2 historical-60b816458fb402630b5e1b835890b7bb39b4da08.zip |
initial version wrt #218170
Package-Manager: portage-2.1.5_rc6
Diffstat (limited to 'www-apache')
-rw-r--r-- | www-apache/passenger/ChangeLog | 10 | ||||
-rw-r--r-- | www-apache/passenger/Manifest | 16 | ||||
-rw-r--r-- | www-apache/passenger/files/1.0.1-gentoo.patch | 89 | ||||
-rw-r--r-- | www-apache/passenger/files/30_mod_passenger.conf | 39 | ||||
-rw-r--r-- | www-apache/passenger/metadata.xml | 6 | ||||
-rw-r--r-- | www-apache/passenger/passenger-1.0.1.ebuild | 67 |
6 files changed, 227 insertions, 0 deletions
diff --git a/www-apache/passenger/ChangeLog b/www-apache/passenger/ChangeLog new file mode 100644 index 000000000000..cd436b1b093e --- /dev/null +++ b/www-apache/passenger/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for www-apache/passenger +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/ChangeLog,v 1.1 2008/04/25 10:56:33 hollow Exp $ + +*passenger-1.0.1 (25 Apr 2008) + + 25 Apr 2008; Benedikt Böhm <hollow@gentoo.org> +files/1.0.1-gentoo.patch, + +files/30_mod_passenger.conf, +metadata.xml, +passenger-1.0.1.ebuild: + initial version wrt #218170 + diff --git a/www-apache/passenger/Manifest b/www-apache/passenger/Manifest new file mode 100644 index 000000000000..4e2f30c82358 --- /dev/null +++ b/www-apache/passenger/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX 1.0.1-gentoo.patch 3258 RMD160 da519d9959dcd132008db8b25d3c81673b461f8a SHA1 fa6568451ea78166856a2cebd2bc56c845bd8519 SHA256 6b3a8f36312367b4b1c77be4ab7b595458f1a439ef9745c303e32c383c25fc82 +AUX 30_mod_passenger.conf 1602 RMD160 0b50a86b3e79884ab18cd85f398c1fe9bac5d6ff SHA1 3343f8f65edb48e084ff847f8ed7d571fb5e14f4 SHA256 12ba5a6090dd3e660bef69c5c69bac6255d2237fc04f6ec6ecac53dc5dacca26 +DIST passenger-1.0.1.tar.gz 1668684 RMD160 61495ce6eae6c8aa8d2261ec7527598c99c6369f SHA1 68500f5ae5b520cfb482082c90c5863f6e30b2c1 SHA256 0be68fbf99f3c0da5eec812fd14b45263e2719196c1e2588dca8fbe926479c58 +EBUILD passenger-1.0.1.ebuild 1564 RMD160 76fda40d17c0da2c1774abf0a986cea8d5b7497d SHA1 06f441a6cda361903fbba54fe320c71a9cc4eafb SHA256 9346405367c14f7064b165006f6ae526466a202a9dd0af918844a9f1c14fc686 +MISC ChangeLog 425 RMD160 ad1530a5ff5623e1f393b5c04448bdde6178f42f SHA1 80826a86a0c2d9ec3d7bdbe178852328c4cef0f7 SHA256 dc77b33ae4fa0367541ff94a8c74c1083c9317280db99374db78d550ee6b558a +MISC metadata.xml 179 RMD160 046a67d39c9a5784800b120b3da44d67caa1f0af SHA1 31e15b20d55994a9989fff90a20847c1e76db2cb SHA256 d07e5a69f0aaee3b23884e0e414fad4aba70b9f4a115d2649714b8f1bd99d9fe +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkgRuOoACgkQmPFBzbX68WFcbgCgm1zVc0ZJ3AzTOgrr5y8ZVHC+ +WocAn255c5VHwKLUMAG7qTZpzK0RXbp/ +=sU3D +-----END PGP SIGNATURE----- diff --git a/www-apache/passenger/files/1.0.1-gentoo.patch b/www-apache/passenger/files/1.0.1-gentoo.patch new file mode 100644 index 000000000000..776b6458c0cc --- /dev/null +++ b/www-apache/passenger/files/1.0.1-gentoo.patch @@ -0,0 +1,89 @@ +Index: passenger-1.0.1/Rakefile +=================================================================== +--- passenger-1.0.1.orig/Rakefile ++++ passenger-1.0.1/Rakefile +@@ -37,7 +37,7 @@ APR1_FLAGS.nil? and raise "Could not fin + + CXX = "g++" + THREADING_FLAGS = "-D_REENTRANT" +-CXXFLAGS = "#{THREADING_FLAGS} -Wall -g -I/usr/local/include " << MULTI_ARCH_FLAGS ++CXXFLAGS = "#{ENV['CXXFLAGS']} #{THREADING_FLAGS} -Wall" << MULTI_ARCH_FLAGS + LDFLAGS = "" + + +@@ -87,8 +87,7 @@ subdir 'ext/boost/src' do + # processes, sometimes pthread errors will occur. These errors are harmless + # and should be ignored. Defining NDEBUG guarantees that boost::thread() will + # not abort if such an error occured. +- flags = "-O2 -fPIC -I../.. #{THREADING_FLAGS} -DNDEBUG #{MULTI_ARCH_FLAGS}" +- compile_cxx "*.cpp", flags ++ compile_cxx "*.cpp", "#{CXXFLAGS} -fPIC -I../.. -DNDEBUG" + create_static_library "libboost_thread.a", "*.o" + end + +@@ -101,7 +100,7 @@ end + ##### Apache module + + class APACHE2 +- CXXFLAGS = CXXFLAGS + " -fPIC -g -DPASSENGER_DEBUG #{APR1_FLAGS} #{APXS2_FLAGS} -I.." ++ CXXFLAGS = CXXFLAGS + " -fPIC #{APR1_FLAGS} #{APXS2_FLAGS} -I.." + OBJECTS = { + 'Configuration.o' => %w(Configuration.cpp Configuration.h), + 'Hooks.o' => %w(Hooks.cpp Hooks.h +Index: passenger-1.0.1/lib/passenger/platform_info.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/platform_info.rb ++++ passenger-1.0.1/lib/passenger/platform_info.rb +@@ -115,7 +115,6 @@ private + else + flags = `#{APXS2} -q CFLAGS`.strip << " -I" << `#{APXS2} -q INCLUDEDIR` + flags.strip! +- flags.gsub!(/-O\d? /, '') + return flags + end + end +@@ -139,7 +138,6 @@ private + libs = `#{apr_config} --link-ld`.strip + end + end +- flags.gsub!(/-O\d? /, '') + return [flags, libs] + end + +Index: passenger-1.0.1/bin/passenger-spawn-server +=================================================================== +--- passenger-1.0.1.orig/bin/passenger-spawn-server ++++ passenger-1.0.1/bin/passenger-spawn-server +@@ -16,7 +16,6 @@ + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + require 'pathname' +-$LOAD_PATH.unshift(File.expand_path("#{File.dirname(__FILE__)}/../lib")) + require 'passenger/spawn_manager' + require 'passenger/utils' + +Index: passenger-1.0.1/lib/passenger/request_handler.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/request_handler.rb ++++ passenger-1.0.1/lib/passenger/request_handler.rb +@@ -101,7 +101,6 @@ class RequestHandler + NINJA_PATCHING_LOCK = Mutex.new + @@ninja_patched_action_controller = false + +- File.read("#{File.dirname(__FILE__)}/../../Rakefile") =~ /^PACKAGE_VERSION = "(.*)"$/ + PASSENGER_VERSION = $1 + + # The name of the socket on which the request handler accepts +Index: passenger-1.0.1/lib/passenger/utils.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/utils.rb ++++ passenger-1.0.1/lib/passenger/utils.rb +@@ -20,7 +20,7 @@ require 'etc' + require 'thread' + require 'fastthread' + require 'timeout' +-require File.expand_path("#{File.dirname(__FILE__)}/../../ext/passenger/native_support.so") ++require 'native_support' + + module Passenger + diff --git a/www-apache/passenger/files/30_mod_passenger.conf b/www-apache/passenger/files/30_mod_passenger.conf new file mode 100644 index 000000000000..4cf0a29f75c6 --- /dev/null +++ b/www-apache/passenger/files/30_mod_passenger.conf @@ -0,0 +1,39 @@ +<IfDefine PASSENGER> +LoadModule passenger_module modules/mod_passenger.so + +# The location to the Passenger spawn server. This configuration option is +# essential to Passenger. The correct value is given by the ebuild, and should +# usually not be changed manually. +RailsSpawnServer /usr/bin/passenger-spawn-server + +# This option allows one to specify the Ruby interpreter to use. +RailsRuby /usr/bin/ruby18 + +# Whether Passenger should automatically detect whether a virtual host's +# document root is a Ruby on Rails application. +RailsAutoDetect On + +# The maximum number of Ruby on Rails application instances that may be +# simultaneously active. A larger number results in higher memory usage, but +# improved ability to handle concurrent HTTP clients. +RailsMaxPoolSize 20 + +# The maximum number of seconds that a Ruby on Rails application instance may +# be idle. That is, if an application instance hasn't done anything after the +# given number of seconds, then it will be shutdown in order to conserve +# memory. +RailsPoolIdleTime 120 + +# When the RailsUserSwitching option is enabled a Rails application is started +# as the owner of the file config/environment.rb. So if +# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will +# launch the corresponding Rails application as joe as well. +RailsUserSwitching On + +# Under no circumstances will Rails applications be run as root. If +# environment.rb is owned by root or by an unknown user, then the Rails +# application will run as the user specified by RailsDefaultUser. +RailsDefaultUser apache +</IfDefine> + +# vim: ts=4 filetype=apache diff --git a/www-apache/passenger/metadata.xml b/www-apache/passenger/metadata.xml new file mode 100644 index 000000000000..7dcdaa3f775a --- /dev/null +++ b/www-apache/passenger/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>apache</herd> + <herd>ruby</herd> +</pkgmetadata> diff --git a/www-apache/passenger/passenger-1.0.1.ebuild b/www-apache/passenger/passenger-1.0.1.ebuild new file mode 100644 index 000000000000..ae15864faf5f --- /dev/null +++ b/www-apache/passenger/passenger-1.0.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/passenger-1.0.1.ebuild,v 1.1 2008/04/25 10:56:33 hollow Exp $ + +inherit apache-module flag-o-matic ruby + +DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze" +HOMEPAGE="http://modrails.com/" +SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +DEPEND=">=dev-lang/ruby-1.8.5 + >=dev-ruby/rubygems-0.9.0 + >=dev-ruby/rake-0.8.1 + >=dev-ruby/fastthread-1.0.1 + >=dev-ruby/rspec-1.1.2 + >=dev-ruby/rails-1.2.0" +RDEPEND="${DEPEND}" + +APACHE2_MOD_FILE="${S}/ext/apache2/mod_${PN}.so" +APACHE2_MOD_CONF="30_mod_${PN}" +APACHE2_MOD_DEFINE="PASSENGER" + +need_apache2_2 + +pkg_setup() { + use debug && append-flags -DPASSENGER_DEBUG +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PV}-gentoo.patch + + # set version here to prevent Rakefile parsing + sed -i -e "s/\(PASSENGER_VERSION\) = .*/\1 = '${PV}'/" \ + lib/passenger/request_handler.rb +} + +src_compile() { + cd "${S}"/ext/passenger + ruby_src_compile + + cd "${S}" + APXS2="${APXS}" \ + HTTPD="${APACHE_BIN}" \ + rake apache2 || die "rake apache2 failed" +} + +src_install() { + ( # dont want to pollute calling env + insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') + doins -r lib/passenger + ) || die "failed to install passenger lib" + + dobin bin/passenger-spawn-server + + cd "${S}"/ext/passenger + ruby_einstall + + apache-module_src_install +} |