File rubygem-rails-2_3.spec of Package rubygem-rails-2_3
#
# spec file for package rubygem-rails-2_3 (Version 2.3.2)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: rubygem-rails-2_3
Version: 2.3.2
Release: 2
#
%define mod_name rails
%define mod_branch 2_3
#
Group: Development/Languages/Ruby
License: X11/MIT
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: rubygems_with_buildroot_patch
Requires: rubygems >= 1.3.1
Provides: rubygem-%{mod_name} = %{version}-%{release}
# Obsoletes: rubygem-%{mod_name} < %{version}
BuildRequires: rubygem-rake >= 0.8.3
BuildRequires: rubygem-activesupport-2_3 = 2.3.2
BuildRequires: rubygem-activerecord-2_3 = 2.3.2
BuildRequires: rubygem-actionpack-2_3 = 2.3.2
BuildRequires: rubygem-actionmailer-2_3 = 2.3.2
BuildRequires: rubygem-activeresource-2_3 = 2.3.2
Requires: rubygem-rake >= 0.8.3
Requires: rubygem-activesupport-2_3 = 2.3.2
Requires: rubygem-activerecord-2_3 = 2.3.2
Requires: rubygem-actionpack-2_3 = 2.3.2
Requires: rubygem-actionmailer-2_3 = 2.3.2
Requires: rubygem-activeresource-2_3 = 2.3.2
PreReq: update-alternatives
#
# http://rubyforge.org/projects/rails/
Url: http://www.rubyonrails.org/
Source: http://rubyforge.org/frs/download.php/47181/rails-2.3.2.gem
#
Summary: A web-application framework for the MVC pattern
%description
Rails is a web-application framework for the MVC pattern that includes
both a template engine, controller framework, and object-relational
mapping package. Everything needed to develop web-apps that can run on
CGI, FastCGI, and mod_ruby.
Authors:
--------
rails development team
%prep
%build
%install
%gem_install %{S:0}
mv %{buildroot}%{_bindir}/rails{,-%{mod_branch}}
%{__ln_s} rails %{buildroot}%{_bindir}/rails
# make sure it installs the right version when using rails-1.1
ruby -p -i.bak -e '$_.gsub!(/>= 0/, "= %{version}")' %{buildroot}%{_bindir}/rails-%{mod_branch}
diff -urN %{buildroot}%{_bindir}/rails-%{mod_branch}{.bak,} || :
rm %{buildroot}%{_bindir}/rails-%{mod_branch}.bak
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")'
%clean
%{__rm} -rf %{buildroot}
%post
/usr/sbin/update-alternatives --install \
%{_bindir}/rails rails %{_bindir}/rails-%{mod_branch} 20
%preun
if [ "$1" = 0 ] ; then
/usr/sbin/update-alternatives --remove rails %{_bindir}/rails-%{mod_branch}
fi
%files
%defattr(-,root,root,-)
%ghost %config(noreplace) %{_bindir}/rails
%{_bindir}/rails-%{mod_branch}
%{_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}/
%changelog
* Mon Mar 16 2009 mrueckert@suse.de
- starting package for the rails 2.3 series