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
34 define Package
/ruby
/Default
38 TITLE
:=Ruby scripting language
39 URL
:=http
://www.ruby-lang.org
/
42 define Package
/ruby
/Default
/description
43 Ruby is the interpreted scripting language for quick and easy
44 object-oriented programming. It has many features to process text files
45 and to do system management tasks
(as in perl
). It is simple
,
46 straight-forward
, and extensible.
50 $(call Package
/ruby
/Default
)
55 define Package
/ruby
/description
56 $(call Package
/ruby
/Default
/description
)
59 define Package
/libruby
60 $(call Package
/ruby
/Default
)
64 TITLE
+= (shared library
)
68 # Ongoing work to break up ruby's standard library into coherent pieces
69 # with minimal dependencies between them
71 define Package
/ruby-core
72 $(call Package
/ruby
/Default
)
73 TITLE
:=Ruby standard libraries
77 define Package
/ruby-cgi
78 $(call Package
/ruby
/Default
)
79 TITLE
:=Ruby CGI support toolkit
83 define Package
/ruby-dl
84 $(call Package
/ruby
/Default
)
85 TITLE
+= (dynamic linker support
) (adds
5MB
+)
89 define Package
/ruby-enc
90 $(call Package
/ruby
/Default
)
91 TITLE
+= (character re-coding library
) (adds
2MB
+)
95 define Package
/ruby-erb
96 $(call Package
/ruby
/Default
)
97 TITLE
+= (embedded interpreter
)
101 define Package
/ruby-gdbm
102 $(call Package
/ruby
/Default
)
103 TITLE
:=Ruby support for gdbm
104 DEPENDS
:=ruby
+libgdbm
107 define Package
/ruby-gems
108 $(call Package
/ruby
/Default
)
109 TITLE
:=Ruby gems packet management
110 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
113 define Package
/ruby-irb
114 $(call Package
/ruby
/Default
)
115 TITLE
+= (interactive
shell)
116 DEPENDS
:=ruby
+ruby-core
119 define Package
/ruby-json
120 $(call Package
/ruby
/Default
)
121 TITLE
:=Ruby support for JSON
125 define Package
/ruby-ncurses
126 $(call Package
/ruby
/Default
)
127 TITLE
:=Ruby support for ncurses
128 DEPENDS
:=ruby
+libncurses
131 define Package
/ruby-nkf
132 $(call Package
/ruby
/Default
)
133 TITLE
:=Ruby Network Kanji Filter
137 define Package
/ruby-openssl
138 $(call Package
/ruby
/Default
)
139 TITLE
:=Ruby support for openssl
140 DEPENDS
:=ruby
+libopenssl
143 define Package
/ruby-rdoc
144 $(call Package
/ruby
/Default
)
145 TITLE
+= (documentation generator
)
149 define Package
/ruby-rake
150 $(call Package
/ruby
/Default
)
151 TITLE
+=Ruby Rake
(make replacement
)
155 define Package
/ruby-readline
156 $(call Package
/ruby
/Default
)
157 TITLE
:=Ruby support for readline
158 DEPENDS
:=ruby
+libncurses
+libreadline
161 define Package
/ruby-rexml
162 $(call Package
/ruby
/Default
)
163 TITLE
:=Ruby XML toolkit
167 define Package
/ruby-rss
168 $(call Package
/ruby
/Default
)
169 TITLE
:=Ruby RSS toolkit
173 define Package
/ruby-unit
174 $(call Package
/ruby
/Default
)
175 TITLE
:=Ruby unit testing toolkit
179 define Package
/ruby-webrick
180 $(call Package
/ruby
/Default
)
181 TITLE
:=Ruby Web server toolkit
185 define Package
/ruby-xmlrpc
186 $(call Package
/ruby
/Default
)
187 TITLE
:=Ruby XML-RPC toolkit
191 define Package
/ruby-yaml
192 $(call Package
/ruby
/Default
)
193 TITLE
:=Ruby YAML toolkit
197 define Package
/ruby-zlib
198 $(call Package
/ruby
/Default
)
199 TITLE
:=Ruby support for zlib
209 --enable-wide-getaddrinfo \
210 --with-ruby-version
=minor \
211 --with-iconv-dir
=$(STAGING_DIR_ROOT
)/..
/usr
/lib
/libiconv \
213 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
216 DESTDIR
="$(PKG_INSTALL_DIR)" \
220 $(call Build
/Prepare
/Default
)
221 ( cd
$(PKG_BUILD_DIR
) ; \
226 define Package
/ruby
/install
227 $(INSTALL_DIR
) $(1)/usr
/bin
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
231 define Package
/libruby
/install
232 $(INSTALL_DIR
) $(1)/usr
/lib
233 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
236 define Package
/ruby-core
/install
237 $(INSTALL_DIR
) $(1)/usr
/lib
238 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
240 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
242 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
244 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
247 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
251 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
253 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
255 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
263 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
268 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
270 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
271 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
272 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
274 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
277 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
279 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
282 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
283 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
285 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
286 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
288 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
290 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
291 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
293 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
295 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
298 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
300 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
301 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
302 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
304 find
$(1) -name
'*.h' | xargs
rm -f
307 define Package
/ruby-cgi
/install
308 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
309 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
310 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
313 define Package
/ruby-dl
/install
314 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
315 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
316 ) |
( cd
$(1); $(TAR
) -xf
- )
319 define Package
/ruby-enc
/install
320 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
321 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
322 ) |
( cd
$(1); $(TAR
) -xf
- )
325 define Package
/ruby-erb
/install
326 $(INSTALL_DIR
) $(1)/usr
/bin
327 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
328 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
329 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
332 define Package
/ruby-gdbm
/install
333 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
334 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
335 ) |
( cd
$(1); $(TAR
) -xf
- )
338 define Package
/ruby-gems
/install
339 $(INSTALL_DIR
) $(1)/usr
/bin
340 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gem
$(1)/usr
/bin
/
341 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
342 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
343 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
346 define Package
/ruby-irb
/install
347 $(INSTALL_DIR
) $(1)/usr
/bin
348 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
349 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
350 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
351 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
354 define Package
/ruby-json
/install
355 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
356 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
357 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
358 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
359 ) |
( cd
$(1); $(TAR
) -xf
- )
362 define Package
/ruby-ncurses
/install
363 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
364 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
365 ) |
( cd
$(1); $(TAR
) -xf
- )
368 define Package
/ruby-nkf
/install
369 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
370 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
371 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
372 ) |
( cd
$(1); $(TAR
) -xf
- )
375 define Package
/ruby-openssl
/install
376 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
377 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
378 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
379 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
380 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
381 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
382 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
383 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
384 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
385 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
386 ) |
( cd
$(1); $(TAR
) -xf
- )
389 define Package
/ruby-rdoc
/install
390 $(INSTALL_DIR
) $(1)/usr
/bin
391 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
392 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
393 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
394 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
397 define Package
/ruby-rake
/install
398 $(INSTALL_DIR
) $(1)/usr
/bin
399 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
400 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
401 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
402 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
405 define Package
/ruby-readline
/install
406 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
407 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
408 ) |
( cd
$(1); $(TAR
) -xf
- )
411 define Package
/ruby-rexml
/install
412 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
413 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
417 define Package
/ruby-rss
/install
418 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
419 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
420 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
423 define Package
/ruby-unit
/install
424 $(INSTALL_DIR
) $(1)/usr
/bin
425 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
426 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
427 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
430 define Package
/ruby-webrick
/install
431 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
432 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
433 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
436 define Package
/ruby-xmlrpc
/install
437 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
438 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
441 define Package
/ruby-yaml
/install
442 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
443 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
444 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
445 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
446 ) |
( cd
$(1); $(TAR
) -xf
- )
449 define Package
/ruby-zlib
/install
450 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
451 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
452 ) |
( cd
$(1); $(TAR
) -xf
- )
455 define Build
/InstallDev
456 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
458 ) |
( cd
$(1); $(TAR
) -xf
- )
461 $(eval
$(call BuildPackage
,ruby
))
462 $(eval
$(call BuildPackage
,libruby
))
463 $(eval
$(call BuildPackage
,ruby-core
))
464 $(eval
$(call BuildPackage
,ruby-cgi
))
465 $(eval
$(call BuildPackage
,ruby-dl
))
466 $(eval
$(call BuildPackage
,ruby-enc
))
467 $(eval
$(call BuildPackage
,ruby-erb
))
468 $(eval
$(call BuildPackage
,ruby-gdbm
))
469 $(eval
$(call BuildPackage
,ruby-gems
))
470 $(eval
$(call BuildPackage
,ruby-json
))
471 $(eval
$(call BuildPackage
,ruby-irb
))
472 $(eval
$(call BuildPackage
,ruby-ncurses
))
473 $(eval
$(call BuildPackage
,ruby-nkf
))
474 $(eval
$(call BuildPackage
,ruby-openssl
))
475 $(eval
$(call BuildPackage
,ruby-rake
))
476 $(eval
$(call BuildPackage
,ruby-rdoc
))
477 $(eval
$(call BuildPackage
,ruby-readline
))
478 $(eval
$(call BuildPackage
,ruby-rexml
))
479 $(eval
$(call BuildPackage
,ruby-rss
))
480 $(eval
$(call BuildPackage
,ruby-unit
))
481 $(eval
$(call BuildPackage
,ruby-webrick
))
482 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
483 $(eval
$(call BuildPackage
,ruby-yaml
))
484 $(eval
$(call BuildPackage
,ruby-zlib
))
485 $(eval
$(call HostBuild
))