Tue, 02 Jul 2013 21:40:10 +0200
Try to correct broken build configuration and installation structure.
1 ##
2 ## ruby-rails.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # MSvB: Supposedly only really runtime depend on:
25 # actionmailer
26 # actionpack
27 # activerecord
28 # activeresource
29 # activesupport
30 # bundler
31 # railties
33 # package version
34 %define V_il8n 0.6.1 # not 0.6.4
35 %define V_multijson 1.7.2
36 %define V_activesupport 3.2.13
37 %define V_builder 3.0.0 # not 3.2.0
38 %define V_activemodel 3.2.13
39 %define V_rack 1.4.5 # not 1.5.2
40 %define V_rackcache 1.2
41 %define V_racktest 0.6.2
42 %define V_journey 1.0.4
43 %define V_hike 1.2.1
44 %define V_tilt 1.3.6
45 %define V_sprockets 2.2.1 # not 2.9.0
46 %define V_erubis 2.7.0
47 %define V_actionpack 3.2.13
48 %define V_arel 3.0.2
49 %define V_tzinfo 0.3.37
50 %define V_activerecord 3.2.13
51 %define V_activeresource 3.2.13
52 %define V_mimetypes 1.21
53 %define V_polyglot 0.3.3
54 %define V_treetop 1.4.12
55 %define V_mail 2.5.3
56 %define V_actionmailer 3.2.13
57 %define V_rackssl 1.3.3
58 %define V_thor 0.18.0
59 %define V_rdoc 3.4 # not 4.0.1
60 %define V_railties 3.2.13
61 %define V_bundler 1.3.4
62 %define V_rails 3.2.13
64 # package information
65 Name: ruby-rails
66 Summary: Ruby Packages for Rails web framework
67 URL: http://www.rubyonrails.org/
68 Vendor: David Heinemeier Hansson
69 Packager: Michael Schloh von Bennewitz
70 Distribution: Europalab Networks Production
71 Class: EVAL
72 Group: Language
73 License: GPL
74 Version: 0
75 Release: 20120800
77 # list of sources
78 Source0: http://rubygems.org/downloads/i18n-%{V_il8n}.gem
79 Source1: http://rubygems.org/downloads/multi_json-%{V_multijson}.gem
80 Source2: http://rubygems.org/downloads/activesupport-%{V_activesupport}.gem
81 Source3: http://rubygems.org/downloads/builder-%{V_builder}.gem
82 Source4: http://rubygems.org/downloads/activemodel-%{V_activemodel}.gem
83 Source5: http://rubygems.org/downloads/rack-%{V_rack}.gem
84 Source6: http://rubygems.org/downloads/rack-cache-%{V_rackcache}.gem
85 Source7: http://rubygems.org/downloads/rack-test-%{V_racktest}.gem
86 Source8: http://rubygems.org/downloads/journey-%{V_journey}.gem
87 Source9: http://rubygems.org/downloads/hike-%{V_hike}.gem
88 Source10: http://rubygems.org/downloads/tilt-%{V_tilt}.gem
89 Source11: http://rubygems.org/downloads/sprockets-%{V_sprockets}.gem
90 Source12: http://rubygems.org/downloads/erubis-%{V_erubis}.gem
91 Source13: http://rubygems.org/downloads/actionpack-%{V_actionpack}.gem
92 Source14: http://rubygems.org/downloads/arel-%{V_arel}.gem
93 Source15: http://rubygems.org/downloads/tzinfo-%{V_tzinfo}.gem
94 Source16: http://rubygems.org/downloads/activerecord-%{V_activerecord}.gem
95 Source17: http://rubygems.org/downloads/activeresource-%{V_activeresource}.gem
96 Source18: http://rubygems.org/downloads/mime-types-%{V_mimetypes}.gem
97 Source19: http://rubygems.org/downloads/polyglot-%{V_polyglot}.gem
98 Source20: http://rubygems.org/downloads/treetop-%{V_treetop}.gem
99 Source21: http://rubygems.org/downloads/mail-%{V_mail}.gem
100 Source22: http://rubygems.org/downloads/actionmailer-%{V_actionmailer}.gem
101 Source23: http://rubygems.org/downloads/rack-ssl-%{V_rackssl}.gem
102 Source24: http://rubygems.org/downloads/thor-%{V_thor}.gem
103 Source25: http://rubygems.org/downloads/rdoc-%{V_rdoc}.gem
104 Source26: http://rubygems.org/downloads/railties-%{V_railties}.gem
105 Source27: http://rubygems.org/downloads/bundler-%{V_bundler}.gem
106 Source28: http://rubygems.org/downloads/rails-%{V_rails}.gem
108 # build information
109 BuildPreReq: OpenPKG, openpkg >= 20100101, ruby
110 PreReq: OpenPKG, openpkg >= 20100101, ruby
112 %description
113 These are Ruby extensions to support web application development.
115 %track
116 prog ruby-rails:il8n = {
117 version = %{V_il8n}
118 url = http://rubygems.org/gems/il8n
119 regex = il8n-(__VER__)\.gem
120 }
121 prog ruby-rails:multijson = {
122 version = %{V_multijson}
123 url = http://rubygems.org/gems/multi_json
124 regex = multi_json-(__VER__)\.gem
125 }
126 prog ruby-rails:activesupport = {
127 version = %{V_activesupport}
128 url = http://rubygems.org/gems/activesupport
129 regex = activesupport-(__VER__)\.gem
130 }
131 prog ruby-rails:builder = {
132 version = %{V_builder}
133 url = http://rubygems.org/gems/builder
134 regex = builder-(__VER__)\.gem
135 }
136 prog ruby-rails:activemodel = {
137 version = %{V_activemodel}
138 url = http://rubygems.org/gems/activemodel
139 regex = activemodel-(__VER__)\.gem
140 }
141 prog ruby-rails:rack = {
142 version = %{V_rack}
143 url = http://rubygems.org/gems/rack
144 regex = rack-(__VER__)\.gem
145 }
146 prog ruby-rails:rackcache = {
147 version = %{V_rackcache}
148 url = http://rubygems.org/gems/rack-cache
149 regex = rack-cache-(__VER__)\.gem
150 }
151 prog ruby-rails:racktest = {
152 version = %{V_racktest}
153 url = http://rubygems.org/gems/rack-test
154 regex = rack-test-(__VER__)\.gem
155 }
156 prog ruby-rails:journey = {
157 version = %{V_journey}
158 url = http://rubygems.org/gems/journey
159 regex = journey-(__VER__)\.gem
160 }
161 prog ruby-rails:hike = {
162 version = %{V_hike}
163 url = http://rubygems.org/gems/hike
164 regex = hike-(__VER__)\.gem
165 }
166 prog ruby-rails:tilt = {
167 version = %{V_tilt}
168 url = http://rubygems.org/gems/tilt
169 regex = tilt-(__VER__)\.gem
170 }
171 prog ruby-rails:sprockets = {
172 version = %{V_sprockets}
173 url = http://rubygems.org/gems/sprockets
174 regex = sprockets-(__VER__)\.gem
175 }
176 prog ruby-rails:erubis = {
177 version = %{V_erubis}
178 url = http://rubygems.org/gems/erubis
179 regex = erubis-(__VER__)\.gem
180 }
181 prog ruby-rails:actionpack = {
182 version = %{V_actionpack}
183 url = http://rubygems.org/gems/actionpack
184 regex = actionpack-(__VER__)\.gem
185 }
186 prog ruby-rails:arel = {
187 version = %{V_arel}
188 url = http://rubygems.org/gems/arel
189 regex = arel-(__VER__)\.gem
190 }
191 prog ruby-rails:tzinfo = {
192 version = %{V_tzinfo}
193 url = http://rubygems.org/gems/tzinfo
194 regex = tzinfo-(__VER__)\.gem
195 }
196 prog ruby-rails:activerecord = {
197 version = %{V_activerecord}
198 url = http://rubygems.org/gems/activerecord
199 regex = activerecord-(__VER__)\.gem
200 }
201 prog ruby-rails:activeresource = {
202 version = %{V_activeresource}
203 url = http://rubygems.org/gems/activeresource
204 regex = activeresource-(__VER__)\.gem
205 }
206 prog ruby-rails:mimetypes = {
207 version = %{V_mimetypes}
208 url = http://rubygems.org/gems/mime-types
209 regex = mime-types-(__VER__)\.gem
210 }
211 prog ruby-rails:polyglot = {
212 version = %{V_polyglot}
213 url = http://rubygems.org/gems/polyglot
214 regex = polyglot-(__VER__)\.gem
215 }
216 prog ruby-rails:treetop = {
217 version = %{V_treetop}
218 url = http://rubygems.org/gems/treetop
219 regex = treetop-(__VER__)\.gem
220 }
221 prog ruby-rails:mail = {
222 version = %{V_mail}
223 url = http://rubygems.org/gems/mail
224 regex = mail-(__VER__)\.gem
225 }
226 prog ruby-rails:actionmailer = {
227 version = %{V_actionmailer}
228 url = http://rubygems.org/gems/actionmailer
229 regex = actionmailer-(__VER__)\.gem
230 }
231 prog ruby-rails:rackssl = {
232 version = %{V_rackssl}
233 url = http://rubygems.org/gems/rack-ssl
234 regex = rack-ssl-(__VER__)\.gem
235 }
236 prog ruby-rails:thor = {
237 version = %{V_thor}
238 url = http://rubygems.org/gems/thor
239 regex = thor-(__VER__)\.gem
240 }
241 prog ruby-rails:rdoc = {
242 version = %{V_rdoc}
243 url = http://rubygems.org/gems/rdoc
244 regex = rdoc-(__VER__)\.gem
245 }
246 prog ruby-rails:railties = {
247 version = %{V_railties}
248 url = http://rubygems.org/gems/railties
249 regex = railties-(__VER__)\.gem
250 }
251 prog ruby-rails:bundler = {
252 version = %{V_bundler}
253 url = http://rubygems.org/gems/bundler
254 regex = bundler-(__VER__)\.gem
255 }
256 prog ruby-rails:rails = {
257 version = %{V_rails}
258 url = http://rubygems.org/gems/rails
259 regex = rails-(__VER__)\.gem
260 }
262 %prep
263 %setup -q -T -c
265 %build
267 %install
268 RUBY_VERSION=`%{l_prefix}/bin/gem which rubygems | sed -e 's;.*/\([^/]*\)/rubygems\.rb$;\1;'`
269 export GEM_HOME=$RPM_BUILD_ROOT%{l_prefix}/lib/ruby/gems/$RUBY_VERSION
270 %{l_shtool} mkdir -f -p -m 755 $GEM_HOME
271 %{l_prefix}/bin/gem install --local %{SOURCE0}
272 %{l_prefix}/bin/gem install --local %{SOURCE1}
273 %{l_prefix}/bin/gem install --local %{SOURCE2}
274 %{l_prefix}/bin/gem install --local %{SOURCE3}
275 %{l_prefix}/bin/gem install --local %{SOURCE4}
276 %{l_prefix}/bin/gem install --local %{SOURCE5}
277 %{l_prefix}/bin/gem install --local %{SOURCE6}
278 %{l_prefix}/bin/gem install --local %{SOURCE7}
279 %{l_prefix}/bin/gem install --local %{SOURCE8}
280 %{l_prefix}/bin/gem install --local %{SOURCE9}
281 %{l_prefix}/bin/gem install --local %{SOURCE10}
282 %{l_prefix}/bin/gem install --local %{SOURCE11}
283 %{l_prefix}/bin/gem install --local %{SOURCE12}
284 %{l_prefix}/bin/gem install --local %{SOURCE13}
285 %{l_prefix}/bin/gem install --local %{SOURCE14}
286 %{l_prefix}/bin/gem install --local %{SOURCE15}
287 %{l_prefix}/bin/gem install --local %{SOURCE16}
288 %{l_prefix}/bin/gem install --local %{SOURCE17}
289 %{l_prefix}/bin/gem install --local %{SOURCE18}
290 %{l_prefix}/bin/gem install --local %{SOURCE19}
291 %{l_prefix}/bin/gem install --local %{SOURCE20}
292 %{l_prefix}/bin/gem install --local %{SOURCE21}
293 %{l_prefix}/bin/gem install --local %{SOURCE22}
294 %{l_prefix}/bin/gem install --local %{SOURCE23}
295 %{l_prefix}/bin/gem install --local %{SOURCE24}
296 %{l_prefix}/bin/gem install --local %{SOURCE25}
297 %{l_prefix}/bin/gem install --local %{SOURCE26}
298 %{l_prefix}/bin/gem install --local %{SOURCE27}
299 %{l_prefix}/bin/gem install --local %{SOURCE28}
300 ( cd $GEM_HOME/gems/thor-*/spec/fixtures
301 mv path\ with\ spaces pathwithoutspaces
302 ) || exit $?
303 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
304 ( cd $GEM_HOME/gems/thor-*/spec/fixtures
305 mv pathwithoutspaces path\ with\ spaces
306 ) || exit $?
307 %{l_shtool} subst \
308 -e 's;\(.\)%;\1?;g' \
309 -e 's;\(.*\)pathwithoutspaces\(.*\);"\1path with spaces\2";' \
310 files
312 %files -f files
314 %clean
316 %post
317 # Give notice of internally distributed V8 implementation
318 ( echo "Because most Rails web development uses JavaScript, this package"
319 echo " while not explicitly specifying dependence on a JavaScript"
320 echo " interpreter does likely require one. Install the package"
321 echo " \'node\' to fulfill this likely requirement."
322 ) | %{l_rpmtool} msg -b -t warning