]> git.pld-linux.org Git - packages/ruby-rails.git/blob - ruby-rails.spec
- install to ruby_vendorlibdir
[packages/ruby-rails.git] / ruby-rails.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # skip (time-consuming) docs generating; intended for speed up test builds
4 #
5 %define         pkgname         rails
6 Summary:        Web-application framework with template engine, control-flow layer, and ORM
7 Name:           ruby-%{pkgname}
8 Version:        3.2.19
9 Release:        3
10 License:        MIT
11 Group:          Development/Languages
12 Source0:        http://rubygems.org/downloads/railties-%{version}.gem
13 # Source0-md5:  541a47ca3d89fb1103dc2a54b41f86ff
14 Source1:        http://rubygems.org/downloads/rails-%{version}.gem
15 # Source1-md5:  3545800bc87637a368eb9614b5309a4e
16 URL:            http://www.rubyonrails.org/
17 Patch0:         system-bundle.patch
18 Patch1:         disable-sprockets.patch
19 Patch2:         bogus-deps.patch
20 BuildRequires:  rpmbuild(macros) >= 1.665
21 BuildRequires:  ruby-bundler >= 1.0.3
22 BuildRequires:  ruby-modules >= 1.9.2
23 Requires:       ruby-actionmailer = %{version}
24 Requires:       ruby-actionpack = %{version}
25 Requires:       ruby-activerecord = %{version}
26 Requires:       ruby-activeresource = %{version}
27 Requires:       ruby-activesupport = %{version}
28 Requires:       ruby-arel >= 3.0.2
29 Requires:       ruby-builder >= 3.0.0
30 Requires:       ruby-erubis >= 2.7.0
31 Requires:       ruby-i18n >= 0.6.4
32 Requires:       ruby-journey >= 1.0.4
33 Requires:       ruby-mail >= 2.5.4
34 Requires:       ruby-modules >= 1.9.2
35 Requires:       ruby-multi_json >= 1.0
36 Requires:       ruby-polyglot >= 0.3.1
37 Requires:       ruby-rack >= 1.4.5
38 Requires:       ruby-rack-cache >= 1.2
39 Requires:       ruby-rack-test >= 0.6.1
40 Requires:       ruby-railties = %{version}-%{release}
41 Requires:       ruby-treetop >= 1.4.8
42 Requires:       ruby-tzinfo >= 0.3.29
43 Conflicts:      ruby-arel >= 3.1
44 Conflicts:      ruby-builder >= 4.0
45 Conflicts:      ruby-erubis >= 2.8.0
46 Conflicts:      ruby-i18n >= 1.0
47 Conflicts:      ruby-journey >= 1.1
48 Conflicts:      ruby-mail >= 2.6
49 Conflicts:      ruby-multi_json >= 2.0
50 Conflicts:      ruby-rack >= 1.5
51 Conflicts:      ruby-rack-cache >= 2.0
52 Conflicts:      ruby-rack-test >= 0.7
53 Conflicts:      ruby-treetop >= 1.5
54 Conflicts:      ruby-tzinfo >= 0.4
55 Obsoletes:      railties
56 Obsoletes:      ruby-Rails
57 BuildArch:      noarch
58 %{?ruby_mod_ver_requires_eq}
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 # nothing to be placed there. we're not noarc only because of ruby packaging
62 %define         _enable_debug_packages  0
63
64 %description
65 Rails is a framework for building web-application using CGI, FCGI,
66 mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2,
67 SQL Server, or Oracle with eRuby- or Builder-based templates.
68
69 %description -l pl.UTF-8
70 rails to skrypty wiążące biblioteki tworzące razem Ruby on Rails.
71
72 Ruby on Rails to platforma WWW do szybkiego tworzenia aplikacji
73 napisana w języku Ruby.
74
75 This package contains development tools.
76
77 %package -n ruby-railties
78 Summary:        Gluing the Engine to the Rails
79 Group:          Development/Languages
80 Requires:       ruby-rails = %{version}-%{release}
81 #Requires:      ruby-coffee-rails >= 3.2.1
82 Requires:       ruby-jquery-rails
83 Requires:       ruby-sass-rails >= 3.2.3
84 Requires:       ruby-sqlite3
85 #Suggests:      ruby-uglifier >= 1.0.3
86 #Suggests:      ruby-sprockets >= 2.2.1
87 #Conflicts:     ruby-sprockets >= 2.3
88 #Conflicts:     ruby-coffee-rails >= 3.3
89 Conflicts:      sass-rails >= 3.3
90
91 %description -n ruby-railties
92 Rails is a framework for building web-application using CGI, FCGI,
93 mod_ruby, or WEBrick on top of either MySQL, PostgreSQL, SQLite, DB2,
94 SQL Server, or Oracle with eRuby- or Builder-based templates.
95
96 This package contains railties module.
97
98 %package rdoc
99 Summary:        HTML documentation for %{pkgname}
100 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
101 Group:          Documentation
102 Requires:       ruby >= 1:1.8.7-4
103
104 %description rdoc
105 HTML documentation for %{pkgname}.
106
107 %description rdoc -l pl.UTF-8
108 Dokumentacja w formacie HTML dla %{pkgname}.
109
110 %package ri
111 Summary:        ri documentation for %{pkgname}
112 Summary(pl.UTF-8):      Dokumentacja w formacie ri dla %{pkgname}
113 Group:          Documentation
114 Requires:       ruby
115
116 %description ri
117 ri documentation for %{pkgname}.
118
119 %description ri -l pl.UTF-8
120 Dokumentacji w formacie ri dla %{pkgname}.
121
122 %prep
123 %setup -q -n %{pkgname}-%{version}
124 install -d railgem
125 %{__tar} xf %{SOURCE1} -C railgem/
126
127 %patch0 -p1
128 %patch1 -p1
129
130 # write .gemspec
131 cd railgem
132 %__gem_helper spec
133 cd ..
134 %__gem_helper spec
135 %patch2 -p1
136
137 find -newer README.rdoc -o -print | xargs touch --reference %{SOURCE0}
138
139 %{__grep} -rl '/usr/bin/env' . | xargs %{__sed} -i -e '
140         s,/usr/bin/env ruby,%{__ruby},
141         s,/usr/bin/env spawn-fcgi,/usr/sbin/spawn-fcgi,
142         s,/usr/bin/env \(#{File.expand_path(\$0)}\),\1,
143 '
144
145 # cleanup backups after patching
146 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
147
148 %build
149 %{__sed} -i -e 's/\(.*s.add_dependency.*rdoc.*\)~>\(.*3.4.*\)/\1>\2/g' \
150         railties*.gemspec
151
152 %if %{with doc}
153 rdoc --ri --op ri lib
154 rdoc --op rdoc lib
155 rm -r ri/{ActiveSupport,Object,Plugin,RecursiveHTTPFetcher}
156 rm ri/created.rid
157 %endif
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{pkgname}} \
162         $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}} \
163         $RPM_BUILD_ROOT%{ruby_specdir}
164
165 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
166 %if %{with doc}
167 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
168 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
169 %endif
170 #-cp -a bin builtin configs dispatches doc environments helpers html fresh_rakefile README $RPM_BUILD_ROOT%{_datadir}/%{pkgname}
171 cp -a bin $RPM_BUILD_ROOT%{_datadir}/%{pkgname}
172 install -p bin/rails $RPM_BUILD_ROOT%{_bindir}/rails
173
174 cp -p railties-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
175 cp -p railgem/%{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
176
177 cat <<'EOF' > $RPM_BUILD_ROOT%{ruby_vendorlibdir}/railties_path.rb
178 RAILTIES_PATH = "%{_datadir}/%{pkgname}"
179 EOF
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %files
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_bindir}/rails
187 %{_datadir}/%{pkgname}
188 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
189
190 %if %{with doc}
191 %files rdoc
192 %defattr(644,root,root,755)
193 %{ruby_rdocdir}/%{name}-%{version}
194
195 %files ri
196 %defattr(644,root,root,755)
197 %{ruby_ridir}/Rails*
198 %endif
199
200 %files -n ruby-railties
201 %defattr(644,root,root,755)
202 %{ruby_vendorlibdir}/*
203 %{ruby_specdir}/railties-%{version}.gemspec
This page took 0.092468 seconds and 3 git commands to generate.