Skip to content

Commit

Permalink
Use a better spec file and update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
h3h committed May 7, 2010
1 parent 7c9ef21 commit 5143799
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 20 deletions.
9 changes: 6 additions & 3 deletions README.markdown
Expand Up @@ -10,6 +10,7 @@ Perform the following on a build box as root.
## Install Prerequisites for RPM Creation

yum groupinstall 'Development Tools'
yum install readline-devel ncurses-devel gdbm-devel db4-devel

## Download REE

Expand All @@ -26,14 +27,16 @@ Perform the following on a build box as root.
## Build the RPM

cd ~/rpmbuild/
rpmbuild -ba SPECS/ruby-enterprise.spec
# the QA_RPATHS var tells the builder to ignore file path errors
QA_RPATHS=$[ 0x0002 ] rpmbuild -ba SPECS/ruby-enterprise.spec

The resulting RPM will be:

~/rpmbuild/RPMS/x86_64/ruby-enterprise-1.8.7-2001.01.x86_64.rpm

## Credits

Based on the `ruby-enterprise.spec` file from Tim Harper found on [a Gist][gs].
Based on the `ruby-enterprise.spec` file from Adam Vollrath, found
on [GitHub as a Gist][gs].

[gs]: http://gist.github.com/35409
[gs]: http://gist.github.com/108940
6 changes: 3 additions & 3 deletions patches/net_http_socket_close.patch
@@ -1,7 +1,7 @@
Index: lib/net/http.rb
Index: source/lib/net/http.rb
===================================================================
--- lib/net/http.rb (revision 26550)
+++ lib/net/http.rb (working copy)
--- source/lib/net/http.rb (revision 26550)
+++ source/lib/net/http.rb (working copy)
@@ -1057,7 +1057,7 @@
res
rescue => exception
Expand Down
110 changes: 96 additions & 14 deletions spec/ruby-enterprise.spec
@@ -1,38 +1,120 @@
Summary: Ruby Enterprise Edition
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2010.01
%define ree_prefix /opt/ruby

Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl
Packager: Adam Vollrath <adam@endpoint.com>
Version: 1.8.7
Release: 2010.01
Release: 2%{?dist}
License: GPL
Group: Applications/System
Source: ruby-enterprise-%{version}-%{release}.tar.gz
Group: Development/Languages
URL: http://www.rubyenterpriseedition.com/

Source0: ruby-enterprise-%{version}-%{phusion_release}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{phusion_release}-root-%(%{__id_u} -n)
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel autoconf gcc unzip openssl-devel db4-devel byacc
BuildRequires: ruby

Patch0: net_http_socket_close.patch

%description
Ruby Enterprise Edition is a copy-on-right friendly version of ruby that also
includes several performance patches.
Ruby Enterprise Edition is a server-oriented friendly branch of Ruby which includes various enhancements:
* A copy-on-write friendly garbage collector. Phusion Passenger uses this, in combination with a technique called preforking, to reduce Ruby on Rails applications' memory usage by 33% on average.
* An improved memory allocator called tcmalloc, which improves performance quite a bit.
* The ability to tweak garbage collector settings for maximum server performance, and the ability to inspect the garbage collector's state. (RailsBench GC patch)
* The ability to dump stack traces for all running threads (caller_for_all_threads), making it easier for one to debug multithreaded Ruby web applications.

%prep
%setup -q -n ruby-enterprise-%{version}-%{release}/source
%setup -q -n ruby-enterprise-%{version}-%{phusion_release}

%patch0 -p0

%package rubygems
Summary: The Ruby standard for packaging ruby libraries
Version: 1.3.5
License: Ruby or GPL+
Group: Development/Libraries
Requires: ruby-enterprise >= 1.8
Provides: ruby-enterprise(rubygems) = %{version}

%description rubygems
RubyGems is the Ruby standard for publishing and managing third party
libraries. This rubygems package is for ruby-enterprise.

%build
./configure --prefix=/opt/ruby
./installer --auto %{ree_prefix} --dont-install-useful-gems --destdir $RPM_BUILD_ROOT

%install
make
make DESTDIR=$RPM_BUILD_ROOT install
# no-op

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/opt/ruby
%{ree_prefix}/
%doc source/ChangeLog
%doc source/COPYING
%doc source/LEGAL
%doc source/LGPL
%doc source/NEWS
%doc source/README
%doc source/README.EXT
%doc source/ToDo

# rubygems
%exclude %{ree_prefix}/bin/gem
%exclude %{ree_prefix}/lib/ruby/gems
%exclude %{ree_prefix}/lib/ruby/site_ruby/1.8/rubygems*
%exclude %{ree_prefix}/lib/ruby/site_ruby/1.8/ubygems.rb
%exclude %{ree_prefix}/lib/ruby/site_ruby/1.8/rbconfig

%files rubygems
%{ree_prefix}/bin/gem
%{ree_prefix}/lib/ruby/gems
%{ree_prefix}/lib/ruby/site_ruby/1.8/rubygems*
%{ree_prefix}/lib/ruby/site_ruby/1.8/ubygems.rb
%{ree_prefix}/lib/ruby/site_ruby/1.8/rbconfig
%doc rubygems/LICENSE.txt
%doc rubygems/README
%doc rubygems/GPL.txt
%doc rubygems/ChangeLog

%changelog
* Thu May 06 2010 Brad Fults <brad at causes dot com>
- Update for use with 1.8.7
* Fri May 07 2010 Brad Fults <brad at causes dot com>
- Updated for release 2010.01
- Changed default destination to /opt/ruby via ree_prefix variable
- Fix release variable's use of %{?dist}

* Wed Dec 02 2009 Adam Vollrath <adam@endpoint.com>
- Updated for release 2009.10

* Wed Oct 07 2009 Adam Vollrath and Richard Templet <hosting@endpoint.com>
- Updated for release 20090928

* Wed Jun 10 2009 Adam Vollrath <adam@endpoint.com>
- Updated for release 20090610

* Tue Jun 02 2009 Adam Vollrath <adam@endpoint.com>
- Added check for existing /usr/local/bin/gem
- Added LICENSE and other important document files

* Mon Jun 01 2009 Adam Vollrath <adam@endpoint.com>
- Refactored to use Phusion's installer instead of building from source
- Changed prefix to just /usr/local
- Added check for existing /usr/local/bin/ruby
- Split rubygems into a subpackage

* Sat May 30 2009 Adam Vollrath <adam@endpoint.com>
- Changed Release number convention
- Added tcmalloc support and `make test`

* Tue May 26 2009 Adam Vollrath <adam@endpoint.com>
- Updated for 1.8.6-20090520
- Several small improvements to spec file

* Fri Dec 13 2008 Tim C. Harper <tim.harper@leadmediapartners.com>
- first build of REE package

0 comments on commit 5143799

Please sign in to comment.