2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
10 # - split up encodings
11 # - allow selection of either native or pure version of a library where supported
12 # +-> some native libraries are probably only supported if ruby-dl is enabled
15 include $(TOPDIR
)/rules.mk
23 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
24 PKG_SOURCE_URL
:=ftp
://ftp.ruby-lang.org
/pub
/ruby
/$(PKG_LIBVER
)/
25 PKG_MD5SUM
:=d8a02cadf57d2571cd4250e248ea7e4b
27 PKG_BUILD_DEPENDS
:=ruby
/host
31 include $(INCLUDE_DIR
)/host-build.mk
32 include $(INCLUDE_DIR
)/package.mk
33 include $(INCLUDE_DIR
)/nls.mk
35 define Package
/ruby
/Default
39 TITLE
:=Ruby scripting language
40 URL
:=http
://www.ruby-lang.org
/
43 define Package
/ruby
/Default
/description
44 Ruby is the interpreted scripting language for quick and easy
45 object-oriented programming. It has many features to process text files
46 and to do system management tasks
(as in perl
). It is simple
,
47 straight-forward
, and extensible.
51 $(call Package
/ruby
/Default
)
56 define Package
/ruby
/description
57 $(call Package
/ruby
/Default
/description
)
60 define Package
/libruby
61 $(call Package
/ruby
/Default
)
65 TITLE
+= (shared library
)
69 # Ongoing work to break up ruby's standard library into coherent pieces
70 # with minimal dependencies between them
72 define Package
/ruby-core
73 $(call Package
/ruby
/Default
)
74 TITLE
:=Ruby standard libraries
78 define Package
/ruby-cgi
79 $(call Package
/ruby
/Default
)
80 TITLE
:=Ruby CGI support toolkit
84 define Package
/ruby-dl
85 $(call Package
/ruby
/Default
)
86 TITLE
+= (dynamic linker support
) (adds
5MB
+)
90 define Package
/ruby-enc
91 $(call Package
/ruby
/Default
)
92 TITLE
+= (character re-coding library
) (adds
2MB
+)
96 define Package
/ruby-erb
97 $(call Package
/ruby
/Default
)
98 TITLE
+= (embedded interpreter
)
102 define Package
/ruby-gdbm
103 $(call Package
/ruby
/Default
)
104 TITLE
:=Ruby support for gdbm
105 DEPENDS
:=ruby
+libgdbm
108 define Package
/ruby-gems
109 $(call Package
/ruby
/Default
)
110 TITLE
:=Ruby gems packet management
111 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
114 define Package
/ruby-irb
115 $(call Package
/ruby
/Default
)
116 TITLE
+= (interactive
shell)
117 DEPENDS
:=ruby
+ruby-core
120 define Package
/ruby-json
121 $(call Package
/ruby
/Default
)
122 TITLE
:=Ruby support for JSON
126 define Package
/ruby-ncurses
127 $(call Package
/ruby
/Default
)
128 TITLE
:=Ruby support for ncurses
129 DEPENDS
:=ruby
+libncurses
132 define Package
/ruby-nkf
133 $(call Package
/ruby
/Default
)
134 TITLE
:=Ruby Network Kanji Filter
138 define Package
/ruby-openssl
139 $(call Package
/ruby
/Default
)
140 TITLE
:=Ruby support for openssl
141 DEPENDS
:=ruby
+libopenssl
144 define Package
/ruby-rdoc
145 $(call Package
/ruby
/Default
)
146 TITLE
+= (documentation generator
)
150 define Package
/ruby-rake
151 $(call Package
/ruby
/Default
)
152 TITLE
+=Ruby Rake
(make replacement
)
156 define Package
/ruby-readline
157 $(call Package
/ruby
/Default
)
158 TITLE
:=Ruby support for readline
159 DEPENDS
:=ruby
+libncurses
+libreadline
162 define Package
/ruby-rexml
163 $(call Package
/ruby
/Default
)
164 TITLE
:=Ruby XML toolkit
168 define Package
/ruby-rss
169 $(call Package
/ruby
/Default
)
170 TITLE
:=Ruby RSS toolkit
174 define Package
/ruby-unit
175 $(call Package
/ruby
/Default
)
176 TITLE
:=Ruby unit testing toolkit
180 define Package
/ruby-webrick
181 $(call Package
/ruby
/Default
)
182 TITLE
:=Ruby Web server toolkit
186 define Package
/ruby-xmlrpc
187 $(call Package
/ruby
/Default
)
188 TITLE
:=Ruby XML-RPC toolkit
192 define Package
/ruby-yaml
193 $(call Package
/ruby
/Default
)
194 TITLE
:=Ruby YAML toolkit
198 define Package
/ruby-zlib
199 $(call Package
/ruby
/Default
)
200 TITLE
:=Ruby support for zlib
210 --enable-wide-getaddrinfo \
211 --with-ruby-version
=minor \
212 --with-iconv-dir
=$(ICONV_PREFIX
) \
214 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
217 DESTDIR
="$(PKG_INSTALL_DIR)" \
221 $(call Build
/Prepare
/Default
)
222 ( cd
$(PKG_BUILD_DIR
) ; \
227 define Package
/ruby
/install
228 $(INSTALL_DIR
) $(1)/usr
/bin
229 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
232 define Package
/libruby
/install
233 $(INSTALL_DIR
) $(1)/usr
/lib
234 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
237 define Package
/ruby-core
/install
238 $(INSTALL_DIR
) $(1)/usr
/lib
239 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
241 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
243 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
246 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
251 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
253 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
255 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
257 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
259 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
261 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
263 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
265 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
267 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
269 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
271 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
272 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
273 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
276 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
278 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
281 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
283 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
284 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
286 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
287 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
289 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
291 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
292 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
297 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
299 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
301 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
302 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
303 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
305 find
$(1) -name
'*.h' | xargs
rm -f
308 define Package
/ruby-cgi
/install
309 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
310 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
311 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
314 define Package
/ruby-dl
/install
315 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
316 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
317 ) |
( cd
$(1); $(TAR
) -xf
- )
320 define Package
/ruby-enc
/install
321 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
322 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
323 ) |
( cd
$(1); $(TAR
) -xf
- )
326 define Package
/ruby-erb
/install
327 $(INSTALL_DIR
) $(1)/usr
/bin
328 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
329 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
330 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
333 define Package
/ruby-gdbm
/install
334 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
335 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
336 ) |
( cd
$(1); $(TAR
) -xf
- )
339 define Package
/ruby-gems
/install
340 $(INSTALL_DIR
) $(1)/usr
/bin
341 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gem
$(1)/usr
/bin
/
342 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
343 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
344 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
347 define Package
/ruby-irb
/install
348 $(INSTALL_DIR
) $(1)/usr
/bin
349 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
350 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
351 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
352 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
355 define Package
/ruby-json
/install
356 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
357 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
358 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
359 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
360 ) |
( cd
$(1); $(TAR
) -xf
- )
363 define Package
/ruby-ncurses
/install
364 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
365 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
366 ) |
( cd
$(1); $(TAR
) -xf
- )
369 define Package
/ruby-nkf
/install
370 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
371 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
372 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
373 ) |
( cd
$(1); $(TAR
) -xf
- )
376 define Package
/ruby-openssl
/install
377 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
378 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
379 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
380 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
381 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
382 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
383 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
384 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
385 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
386 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
387 ) |
( cd
$(1); $(TAR
) -xf
- )
390 define Package
/ruby-rdoc
/install
391 $(INSTALL_DIR
) $(1)/usr
/bin
392 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
393 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
394 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
395 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
398 define Package
/ruby-rake
/install
399 $(INSTALL_DIR
) $(1)/usr
/bin
400 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
401 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
402 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
403 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
406 define Package
/ruby-readline
/install
407 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
408 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
409 ) |
( cd
$(1); $(TAR
) -xf
- )
412 define Package
/ruby-rexml
/install
413 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
414 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
418 define Package
/ruby-rss
/install
419 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
420 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
421 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
424 define Package
/ruby-unit
/install
425 $(INSTALL_DIR
) $(1)/usr
/bin
426 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
427 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
428 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
431 define Package
/ruby-webrick
/install
432 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
433 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
434 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
437 define Package
/ruby-xmlrpc
/install
438 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
439 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
442 define Package
/ruby-yaml
/install
443 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
444 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
445 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
446 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
447 ) |
( cd
$(1); $(TAR
) -xf
- )
450 define Package
/ruby-zlib
/install
451 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
452 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
453 ) |
( cd
$(1); $(TAR
) -xf
- )
456 define Build
/InstallDev
457 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
459 ) |
( cd
$(1); $(TAR
) -xf
- )
462 $(eval
$(call BuildPackage
,ruby
))
463 $(eval
$(call BuildPackage
,libruby
))
464 $(eval
$(call BuildPackage
,ruby-core
))
465 $(eval
$(call BuildPackage
,ruby-cgi
))
466 $(eval
$(call BuildPackage
,ruby-dl
))
467 $(eval
$(call BuildPackage
,ruby-enc
))
468 $(eval
$(call BuildPackage
,ruby-erb
))
469 $(eval
$(call BuildPackage
,ruby-gdbm
))
470 $(eval
$(call BuildPackage
,ruby-gems
))
471 $(eval
$(call BuildPackage
,ruby-json
))
472 $(eval
$(call BuildPackage
,ruby-irb
))
473 $(eval
$(call BuildPackage
,ruby-ncurses
))
474 $(eval
$(call BuildPackage
,ruby-nkf
))
475 $(eval
$(call BuildPackage
,ruby-openssl
))
476 $(eval
$(call BuildPackage
,ruby-rake
))
477 $(eval
$(call BuildPackage
,ruby-rdoc
))
478 $(eval
$(call BuildPackage
,ruby-readline
))
479 $(eval
$(call BuildPackage
,ruby-rexml
))
480 $(eval
$(call BuildPackage
,ruby-rss
))
481 $(eval
$(call BuildPackage
,ruby-unit
))
482 $(eval
$(call BuildPackage
,ruby-webrick
))
483 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
484 $(eval
$(call BuildPackage
,ruby-yaml
))
485 $(eval
$(call BuildPackage
,ruby-zlib
))
486 $(eval
$(call HostBuild
))