1e3f4e8
# Generated from rails-1.2.5.gem by gem2rpm -*- rpm-spec -*-
1e3f4e8
%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
1e3f4e8
%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
1e3f4e8
%define gemname rails
1e3f4e8
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
1e3f4e8
dd67740
%define rubyabi 1.8
dd67740
1e3f4e8
Summary: Web-application framework
1e3f4e8
Name: rubygem-%{gemname}
dd67740
Version: 2.3.4
dd67740
Release: 1%{?dist}
1e3f4e8
Group: Development/Languages
1e3f4e8
License: MIT
1e3f4e8
URL: http://www.rubyonrails.org
1e3f4e8
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
1e3f4e8
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
dd67740
Requires: ruby(rubygems) >= 1.3.4
3e2b749
Requires: rubygem(rake) >= 0.8.3
849c37d
Requires: rubygem(activesupport) = %{version}
849c37d
Requires: rubygem(activerecord) = %{version}
849c37d
Requires: rubygem(actionpack) = %{version}
849c37d
Requires: rubygem(actionmailer) = %{version}
849c37d
Requires: rubygem(activeresource) = %{version}
dd67740
Requires: ruby(abi) = %{rubyabi}
611bc02
1e3f4e8
BuildRequires: rubygems
611bc02
1e3f4e8
BuildArch: noarch
1e3f4e8
Provides: rubygem(%{gemname}) = %{version}
1e3f4e8
1e3f4e8
%description
1e3f4e8
Rails is a framework for building web-application using CGI, FCGI, mod_ruby,
1e3f4e8
or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or
1e3f4e8
Oracle with eRuby- or Builder-based templates.
1e3f4e8
1e3f4e8
1e3f4e8
%prep
1e3f4e8
1e3f4e8
%build
1e3f4e8
1e3f4e8
%install
1e3f4e8
rm -rf %{buildroot}
1e3f4e8
mkdir -p %{buildroot}%{gemdir}
1e3f4e8
gem install --local --install-dir %{buildroot}%{gemdir} \
3e2b749
            -V \
1e3f4e8
            --force %{SOURCE0}
1e3f4e8
mkdir -p %{buildroot}/%{_bindir}
1e3f4e8
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
1e3f4e8
rmdir %{buildroot}%{gemdir}/bin
1e3f4e8
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
1e3f4e8
1e3f4e8
# Cleanup some upstream packaging oddities, mostly to make rpmlint happy
e23e3c2
sed -i '1i#!/usr/bin/ruby\n' %{buildroot}%{geminstdir}/bin/rails
e23e3c2
3e2b749
# ref: bug 496480
e23e3c2
for file in `find %{buildroot}/%{geminstdir}/ -type f -perm /a+x`; do
3e2b749
  sed -i -e '1s|%{_bindir}/env ruby|%{_bindir}/ruby|' $file
e23e3c2
  chmod 755 $file
e23e3c2
done
e23e3c2
e23e3c2
# Remove backup files
e23e3c2
find %{buildroot}/%{geminstdir} -type f -name "*~" -delete
e23e3c2
3e2b749
# Don't delete zero-length files (bug 496480)
3e2b749
#find %{buildroot}/%{geminstdir} -type f -size 0c -exec rm -rvf {} \;
611bc02
e23e3c2
# Fix anything executable that does not have a shebang
e23e3c2
for file in `find %{buildroot}/%{geminstdir} -type f -perm /a+x`; do
e23e3c2
    [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
1e3f4e8
done
1e3f4e8
3e2b749
# For sure...
3e2b749
find %{buildroot} -name \*.gem | xargs chmod 0644
3e2b749
e23e3c2
# Find files with a shebang that do not have executable permissions
e23e3c2
for file in `find %{buildroot}/%{geminstdir} -type f ! -perm /a+x -name "*.rb"`; do
e23e3c2
    [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
e23e3c2
done
e23e3c2
e23e3c2
# Find files that have non-standard-executable-perm
e23e3c2
find %{buildroot}/%{geminstdir} -type f -perm /g+wx -exec chmod -v g-w {} \;
e23e3c2
e23e3c2
# Find files that are not readable
e23e3c2
find %{buildroot}/%{geminstdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
e23e3c2
1e3f4e8
%clean
1e3f4e8
rm -rf %{buildroot}
1e3f4e8
1e3f4e8
%files
1e3f4e8
%defattr(-, root, root, -)
1e3f4e8
%dir %{geminstdir}
1e3f4e8
%{geminstdir}/bin
1e3f4e8
%{geminstdir}/builtin
1e3f4e8
%doc %{geminstdir}/CHANGELOG
1e3f4e8
%{geminstdir}/configs
1e3f4e8
%{geminstdir}/dispatches
1e3f4e8
%{geminstdir}/doc
1e3f4e8
%{geminstdir}/environments
1e3f4e8
%{geminstdir}/fresh_rakefile
611bc02
%{geminstdir}/guides
1e3f4e8
%{geminstdir}/helpers
1e3f4e8
%{geminstdir}/html
1e3f4e8
%{geminstdir}/lib
1e3f4e8
%doc %{geminstdir}/MIT-LICENSE
1e3f4e8
%{geminstdir}/Rakefile
1e3f4e8
%doc %{geminstdir}/README
1e3f4e8
%{_bindir}/rails
1e3f4e8
%{gemdir}/cache/%{gemname}-%{version}.gem
1e3f4e8
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
1e3f4e8
1e3f4e8
1e3f4e8
%changelog
dd67740
* Sun Sep 20 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.3.4-1
dd67740
- Update to 2.3.4
dd67740
a0c8ede
* Fri Jul 31 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.3.3-2
3e2b749
- Restore some changes
3e2b749
611bc02
* Sun Jul 26 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 2.3.3-1
611bc02
- New upstream version
b45eb00
3e2b749
* Wed Jul 24 2009 Scott Seago <sseago@redhat.com> - 2.3.2-3
3e2b749
- Remove the 'delete zero length files' bit, as some of these are needed.
3e2b749
3e2b749
* Wed May  6 2009 David Lutterkort <lutter@redhat.com> - 2.3.2-2
3e2b749
- Fix replacement of shebang lines; broke scripts/generate (bz 496480)
3e2b749
e23e3c2
* Mon Mar 16 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 2.3.2-1
e23e3c2
- New upstream version
e23e3c2
a23b46e
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-2
a23b46e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a23b46e
66f2963
* Tue Dec 23 2008 David Lutterkort <lutter@redhat.com> - 2.2.2-1
66f2963
- New version
66f2963
261423f
* Tue Sep 16 2008 David Lutterkort <dlutter@redhat.com> - 2.1.1-2
261423f
- require rubygems >= 1.1.1; the rails code checks that at runtime
261423f
e10ce41
* Tue Sep 16 2008 David Lutterkort <dlutter@redhat.com> - 2.1.1-1
e10ce41
- New version (fixes CVE-2008-4094)
e10ce41
3205949
* Thu Jul 31 2008 Michael Stahnke <stahnma@fedoraproject.org> - 2.1.0-1
3205949
- New Upstream
3205949
849c37d
* Tue Apr  8 2008 David Lutterkort <dlutter@redhat.com> - 2.0.2-2
849c37d
- Fix dependency
849c37d
79dbd27
* Mon Apr 07 2008 David Lutterkort <dlutter@redhat.com> - 2.0.2-1
79dbd27
- New version
79dbd27
5caad5a
* Mon Dec 10 2007 David Lutterkort <dlutter@redhat.com> - 2.0.1-1
5caad5a
- New version
5caad5a
- No dependency on actionwebservce anymore, depend on activeresource instead
5caad5a
1e3f4e8
* Thu Nov 29 2007 David Lutterkort <dlutter@redhat.com> - 1.2.6-1
1e3f4e8
- Don't copy files into _docdir, mark them as doc in the geminstdir
1e3f4e8
1e3f4e8
* Tue Nov 13 2007 David Lutterkort <dlutter@redhat.com> - 1.2.5-2
1e3f4e8
- Fix buildroot
1e3f4e8
1e3f4e8
* Tue Oct 30 2007 David Lutterkort <dlutter@redhat.com> - 1.2.5-1
1e3f4e8
- Initial package