]>
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 |
9c59edad | 4 | Version: 2.3.15 |
e36a6875 | 5 | Release: 2 |
59e11a31 | 6 | License: MIT |
268cbce5 | 7 | Group: Development/Languages |
05b57fb8 | 8 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
9c59edad | 9 | # Source0-md5: b0720121fb4d8dcd393b1252a7ac6860 |
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 | |
e36a6875 JR |
43 | Requires: ruby-actionmailer = 2.3.15 |
44 | Requires: ruby-actionpack = 2.3.15 | |
45 | Requires: ruby-activerecord = 2.3.15 | |
46 | Requires: ruby-activeresource = 2.3.15 | |
47 | Requires: ruby-activesupport = 2.3.15 | |
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 | |
84765053 | 99 | rm -fr ri/{\<,ActiveSupport,CGI,CodeStatistics,Dir,DispatchServlet} \ |
05b57fb8 JR |
100 | ri/{Gem,Object,Plugin,RecursiveHTTPFetcher,RemoteCGI} \ |
101 | ri/{SourceAnnotationExtractor,Tracker} | |
1e94def9 JR |
102 | rm ri/created.rid |
103 | ||
268cbce5 | 104 | %install |
105 | rm -rf $RPM_BUILD_ROOT | |
1e94def9 JR |
106 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{pkgname}} \ |
107 | $RPM_BUILD_ROOT{%{ruby_rubylibdir},%{ruby_ridir},%{ruby_rdocdir}} | |
1cd4dee0 | 108 | |
05b57fb8 | 109 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_rubylibdir} |
1e94def9 JR |
110 | cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir} |
111 | cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version} | |
05b57fb8 | 112 | cp -a bin builtin configs dispatches doc environments helpers html fresh_rakefile README $RPM_BUILD_ROOT%{_datadir}/%{pkgname} |
59e11a31 | 113 | install -p bin/rails $RPM_BUILD_ROOT%{_bindir}/rails |
1cd4dee0 | 114 | |
1e94def9 | 115 | cat <<'EOF' > $RPM_BUILD_ROOT%{ruby_rubylibdir}/railties_path.rb |
59e11a31 ER |
116 | RAILTIES_PATH = "%{_datadir}/%{pkgname}" |
117 | EOF | |
268cbce5 | 118 | |
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
05b57fb8 | 124 | %attr(755,root,root) %{_bindir}/* |
59e11a31 | 125 | %{_datadir}/%{pkgname} |
05b57fb8 JR |
126 | %{ruby_rubylibdir}/commands* |
127 | %{ruby_rubylibdir}/tasks/* | |
128 | %{ruby_rubylibdir}/console_*.rb | |
129 | %{ruby_rubylibdir}/*_server.rb | |
1e94def9 JR |
130 | |
131 | %files rdoc | |
132 | %defattr(644,root,root,755) | |
133 | %{ruby_rdocdir}/%{name}-%{version} | |
134 | ||
135 | %files ri | |
136 | %defattr(644,root,root,755) | |
05b57fb8 JR |
137 | %{ruby_ridir}/*Generator |
138 | %{ruby_ridir}/Commands | |
139 | %{ruby_ridir}/Listener | |
140 | %{ruby_ridir}/Rails* | |
141 | %{ruby_ridir}/Repositor* | |
59e11a31 | 142 | |
6cdfe6d9 | 143 | %files -n ruby-railties2 |
59e11a31 | 144 | %defattr(644,root,root,755) |
05b57fb8 JR |
145 | %{ruby_rubylibdir}/* |
146 | %exclude %{ruby_rubylibdir}/commands* | |
147 | %exclude %{ruby_rubylibdir}/tasks* | |
148 | %exclude %{ruby_rubylibdir}/console_*.rb | |
149 | %exclude %{ruby_rubylibdir}/*_server.rb |