]>
Commit | Line | Data |
---|---|---|
59e11a31 ER |
1 | %define pkgname rails |
2 | Summary: Web-application framework with template engine, control-flow layer, and ORM | |
2adb7d2a | 3 | Name: ruby-rails2 |
1cc44b67 | 4 | Version: 2.3.16 |
ce25acd1 | 5 | Release: 4 |
59e11a31 | 6 | License: MIT |
268cbce5 | 7 | Group: Development/Languages |
05b57fb8 | 8 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
1cc44b67 | 9 | # Source0-md5: 5fac1910a8174cabc9b82167a276f7e7 |
26226dd6 | 10 | Patch0: ruby-rails-paths.patch |
59e11a31 | 11 | URL: http://www.rubyonrails.org/ |
c4a432c7 | 12 | BuildRequires: rpmbuild(macros) >= 1.277 |
05b57fb8 JR |
13 | BuildRequires: ruby-modules |
14 | Requires: ruby-modules >= 1.8.4-1 | |
cbfc02c0 | 15 | Requires: ruby-railties2 = %{version}-%{release} |
05b57fb8 | 16 | Requires: ruby-rake >= 0.7.2 |
ddbcc8ec | 17 | Obsoletes: railties |
268cbce5 | 18 | Obsoletes: ruby-Rails |
446e55ef | 19 | Provides: ruby-rails = %{version} |
268cbce5 | 20 | #BuildArch: noarch |
22c7d6f7 | 21 | %{?ruby_mod_ver_requires_eq} |
268cbce5 | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
59e11a31 ER |
24 | # nothing to be placed there. we're not noarc only because of ruby packaging |
25 | %define _enable_debug_packages 0 | |
268cbce5 | 26 | |
59e11a31 ER |
27 | %description |
28 | Rails is a framework for building web-application using CGI, FCGI, | |
29 | mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2, | |
30 | SQL Server, or Oracle with eRuby- or Builder-based templates. | |
268cbce5 | 31 | |
99dd75e6 JR |
32 | %description -l pl.UTF-8 |
33 | rails to skrypty wiążące biblioteki tworzące razem Ruby on Rails. | |
ddbcc8ec JB |
34 | |
35 | Ruby on Rails to platforma WWW do szybkiego tworzenia aplikacji | |
99dd75e6 | 36 | napisana w języku Ruby. |
ddbcc8ec | 37 | |
59e11a31 ER |
38 | This package contains development tools. |
39 | ||
2adb7d2a | 40 | %package -n ruby-railties2 |
59e11a31 ER |
41 | Summary: Gluing the Engine to the Rails |
42 | Group: Development/Languages | |
1cc44b67 JR |
43 | Requires: ruby-actionmailer = 2.3.16 |
44 | Requires: ruby-actionpack = 2.3.16 | |
45 | Requires: ruby-activerecord = 2.3.16 | |
46 | Requires: ruby-activeresource = 2.3.16 | |
47 | Requires: ruby-activesupport = 2.3.16 | |
cbfc02c0 | 48 | Provides: ruby-railties = %{version}-%{release} |
59e11a31 | 49 | |
2adb7d2a | 50 | %description -n ruby-railties2 |
59e11a31 ER |
51 | Rails is a framework for building web-application using CGI, FCGI, |
52 | mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2, | |
53 | SQL Server, or Oracle with eRuby- or Builder-based templates. | |
54 | ||
55 | This package contains railties module. | |
56 | ||
1e94def9 JR |
57 | %package rdoc |
58 | Summary: HTML documentation for %{pkgname} | |
59 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
60 | Group: Documentation | |
61 | Requires: ruby >= 1:1.8.7-4 | |
62 | ||
63 | %description rdoc | |
64 | HTML documentation for %{pkgname}. | |
65 | ||
66 | %description rdoc -l pl.UTF-8 | |
67 | Dokumentacja w formacie HTML dla %{pkgname}. | |
68 | ||
69 | %package ri | |
70 | Summary: ri documentation for %{pkgname} | |
71 | Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname} | |
72 | Group: Documentation | |
73 | Requires: ruby | |
74 | ||
75 | %description ri | |
76 | ri documentation for %{pkgname}. | |
77 | ||
78 | %description ri -l pl.UTF-8 | |
79 | Dokumentacji w formacie ri dla %{pkgname}. | |
80 | ||
268cbce5 | 81 | %prep |
05b57fb8 JR |
82 | %setup -qcT |
83 | %{__tar} xf %{SOURCE0} -O data.tar.gz | %{__tar} xz | |
84 | find -newer README -o -print | xargs touch --reference %{SOURCE0} | |
85 | %patch0 -p1 | |
268cbce5 | 86 | |
4afbc250 | 87 | %{__grep} -rl '/usr/bin/env' . | xargs %{__sed} -i -e ' |
05b57fb8 JR |
88 | s,/usr/bin/env ruby,%{__ruby}, |
89 | s,/usr/bin/env spawn-fcgi,/usr/sbin/spawn-fcgi, | |
90 | s,/usr/bin/env \(#{File.expand_path(\$0)}\),\1, | |
4afbc250 ER |
91 | ' |
92 | ||
05b57fb8 JR |
93 | # cleanup backups after patching |
94 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
95 | ||
1e94def9 | 96 | %build |
05b57fb8 JR |
97 | rdoc --ri --op ri lib |
98 | rdoc --op rdoc lib | |
ce25acd1 | 99 | rm -r ri/{ActiveSupport,Dir,DispatchServlet} \ |
05b57fb8 | 100 | ri/{Gem,Object,Plugin,RecursiveHTTPFetcher,RemoteCGI} \ |
ce25acd1 ER |
101 | ri/{SourceAnnotationExtractor,Tracker} \ |
102 | ri/{ActionController,ActiveRecord,Prof,Rack,RubyProf,Test,YAML} \ | |
103 | ri/lib/{rails_generator,tasks} | |
1e94def9 | 104 | rm ri/created.rid |
ce25acd1 | 105 | rm ri/cache.ri |
1e94def9 | 106 | |
268cbce5 | 107 | %install |
108 | rm -rf $RPM_BUILD_ROOT | |
1e94def9 JR |
109 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{pkgname}} \ |
110 | $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
1cd4dee0 | 111 | |
05b57fb8 | 112 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} |
1e94def9 JR |
113 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
114 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
05b57fb8 | 115 | cp -a bin builtin configs dispatches doc environments helpers html fresh_rakefile README $RPM_BUILD_ROOT%{_datadir}/%{pkgname} |
59e11a31 | 116 | install -p bin/rails $RPM_BUILD_ROOT%{_bindir}/rails |
1cd4dee0 | 117 | |
1e94def9 | 118 | cat <<'EOF' > $RPM_BUILD_ROOT%{ruby_rubylibdir}/railties_path.rb |
59e11a31 ER |
119 | RAILTIES_PATH = "%{_datadir}/%{pkgname}" |
120 | EOF | |
268cbce5 | 121 | |
122 | %clean | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
05b57fb8 | 127 | %attr(755,root,root) %{_bindir}/* |
59e11a31 | 128 | %{_datadir}/%{pkgname} |
05b57fb8 | 129 | %{ruby_rubylibdir}/commands* |
ce25acd1 | 130 | %{ruby_rubylibdir}/tasks |
05b57fb8 JR |
131 | %{ruby_rubylibdir}/console_*.rb |
132 | %{ruby_rubylibdir}/*_server.rb | |
1e94def9 JR |
133 | |
134 | %files rdoc | |
135 | %defattr(644,root,root,755) | |
136 | %{ruby_rdocdir}/%{name}-%{version} | |
137 | ||
138 | %files ri | |
139 | %defattr(644,root,root,755) | |
05b57fb8 JR |
140 | %{ruby_ridir}/*Generator |
141 | %{ruby_ridir}/Commands | |
142 | %{ruby_ridir}/Listener | |
143 | %{ruby_ridir}/Rails* | |
144 | %{ruby_ridir}/Repositor* | |
59e11a31 | 145 | |
6cdfe6d9 | 146 | %files -n ruby-railties2 |
59e11a31 | 147 | %defattr(644,root,root,755) |
05b57fb8 JR |
148 | %{ruby_rubylibdir}/* |
149 | %exclude %{ruby_rubylibdir}/commands* | |
150 | %exclude %{ruby_rubylibdir}/tasks* | |
151 | %exclude %{ruby_rubylibdir}/console_*.rb | |
152 | %exclude %{ruby_rubylibdir}/*_server.rb |