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
18 PKG_VERSION
:=1.9.3-p545
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
:=4743c1dc48491070bae8fc8b423bc1a7
27 PKG_BUILD_DEPENDS
:=ruby
/host
32 include $(INCLUDE_DIR
)/host-build.mk
33 include $(INCLUDE_DIR
)/package.mk
34 include $(INCLUDE_DIR
)/nls.mk
36 define Package
/ruby
/Default
40 TITLE
:=Ruby scripting language
41 URL
:=http
://www.ruby-lang.org
/
44 define Package
/ruby
/Default
/description
45 Ruby is the interpreted scripting language for quick and easy
46 object-oriented programming. It has many features to process text files
47 and to do system management tasks
(as in perl
). It is simple
,
48 straight-forward
, and extensible.
52 $(call Package
/ruby
/Default
)
57 define Package
/ruby
/description
58 $(call Package
/ruby
/Default
/description
)
61 define Package
/libruby
62 $(call Package
/ruby
/Default
)
66 TITLE
+= (shared library
)
67 DEPENDS
+= +libpthread
+librt
70 # Ongoing work to break up ruby's standard library into coherent pieces
71 # with minimal dependencies between them
73 define Package
/ruby-core
74 $(call Package
/ruby
/Default
)
75 TITLE
:=Ruby standard libraries
76 DEPENDS
:=ruby
+libdb47
+libffi
79 define Package
/ruby-cgi
80 $(call Package
/ruby
/Default
)
81 TITLE
:=Ruby CGI support toolkit
85 define Package
/ruby-dl
86 $(call Package
/ruby
/Default
)
87 TITLE
+= (dynamic linker support
) (adds
5MB
+)
91 define Package
/ruby-enc
92 $(call Package
/ruby
/Default
)
93 TITLE
+= (character re-coding library
) (adds
2MB
+)
97 define Package
/ruby-erb
98 $(call Package
/ruby
/Default
)
99 TITLE
+= (embedded interpreter
)
103 define Package
/ruby-gdbm
104 $(call Package
/ruby
/Default
)
105 TITLE
:=Ruby support for gdbm
106 DEPENDS
:=ruby
+libgdbm
109 define Package
/ruby-gems
110 $(call Package
/ruby
/Default
)
111 TITLE
:=Ruby gems packet management
112 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
115 define Package
/ruby-irb
116 $(call Package
/ruby
/Default
)
117 TITLE
+= (interactive
shell)
118 DEPENDS
:=ruby
+ruby-core
121 define Package
/ruby-json
122 $(call Package
/ruby
/Default
)
123 TITLE
:=Ruby support for JSON
127 define Package
/ruby-ncurses
128 $(call Package
/ruby
/Default
)
129 TITLE
:=Ruby support for ncurses
130 DEPENDS
:=ruby
+libncurses
+libncursesw
133 define Package
/ruby-nkf
134 $(call Package
/ruby
/Default
)
135 TITLE
:=Ruby Network Kanji Filter
139 define Package
/ruby-openssl
140 $(call Package
/ruby
/Default
)
141 TITLE
:=Ruby support for openssl
142 DEPENDS
:=ruby
+libopenssl
145 define Package
/ruby-rdoc
146 $(call Package
/ruby
/Default
)
147 TITLE
+= (documentation generator
)
151 define Package
/ruby-rake
152 $(call Package
/ruby
/Default
)
153 TITLE
+=Ruby Rake
(make replacement
)
157 define Package
/ruby-readline
158 $(call Package
/ruby
/Default
)
159 TITLE
:=Ruby support for readline
160 DEPENDS
:=ruby
+libncurses
+libreadline
163 define Package
/ruby-rexml
164 $(call Package
/ruby
/Default
)
165 TITLE
:=Ruby XML toolkit
169 define Package
/ruby-rss
170 $(call Package
/ruby
/Default
)
171 TITLE
:=Ruby RSS toolkit
175 define Package
/ruby-unit
176 $(call Package
/ruby
/Default
)
177 TITLE
:=Ruby unit testing toolkit
181 define Package
/ruby-webrick
182 $(call Package
/ruby
/Default
)
183 TITLE
:=Ruby Web server toolkit
187 define Package
/ruby-xmlrpc
188 $(call Package
/ruby
/Default
)
189 TITLE
:=Ruby XML-RPC toolkit
193 define Package
/ruby-yaml
194 $(call Package
/ruby
/Default
)
195 TITLE
:=Ruby YAML toolkit
199 define Package
/ruby-zlib
200 $(call Package
/ruby
/Default
)
201 TITLE
:=Ruby support for zlib
205 HOST_CONFIGURE_ARGS
+= \
206 --disable-install-doc \
207 --disable-install-rdoc \
208 --disable-install-capi
215 --with-ruby-version
=minor \
216 --with-iconv-dir
=$(ICONV_PREFIX
) \
218 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
221 DESTDIR
="$(PKG_INSTALL_DIR)" \
224 define Package
/ruby
/install
225 $(INSTALL_DIR
) $(1)/usr
/bin
226 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
229 define Package
/libruby
/install
230 $(INSTALL_DIR
) $(1)/usr
/lib
231 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
234 define Package
/ruby-core
/install
235 $(INSTALL_DIR
) $(1)/usr
/lib
236 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
238 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
240 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
242 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
243 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
246 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
247 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
251 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
253 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
261 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
268 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
269 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
270 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
272 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
273 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
277 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
278 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
280 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
281 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
283 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
284 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
286 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
288 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
289 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
291 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
293 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
298 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
299 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
300 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
302 find
$(1) -name
'*.h' | xargs
rm -f
305 define Package
/ruby-cgi
/install
306 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
307 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
308 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
311 define Package
/ruby-dl
/install
312 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
313 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
314 ) |
( cd
$(1); $(TAR
) -xf
- )
317 define Package
/ruby-enc
/install
318 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
319 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
320 ) |
( cd
$(1); $(TAR
) -xf
- )
323 define Package
/ruby-erb
/install
324 $(INSTALL_DIR
) $(1)/usr
/bin
325 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
326 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
327 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
330 define Package
/ruby-gdbm
/install
331 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
332 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
333 ) |
( cd
$(1); $(TAR
) -xf
- )
336 define Package
/ruby-gems
/install
337 $(INSTALL_DIR
) $(1)/usr
/bin
338 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gem
$(1)/usr
/bin
/
339 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
340 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
341 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
344 define Package
/ruby-irb
/install
345 $(INSTALL_DIR
) $(1)/usr
/bin
346 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
347 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
348 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
349 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
352 define Package
/ruby-json
/install
353 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
354 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
355 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
356 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
357 ) |
( cd
$(1); $(TAR
) -xf
- )
360 define Package
/ruby-ncurses
/install
361 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
362 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
363 ) |
( cd
$(1); $(TAR
) -xf
- )
366 define Package
/ruby-nkf
/install
367 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
368 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
369 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
370 ) |
( cd
$(1); $(TAR
) -xf
- )
373 define Package
/ruby-openssl
/install
374 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
375 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
376 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
377 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
378 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
379 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
380 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
381 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
382 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
383 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
384 ) |
( cd
$(1); $(TAR
) -xf
- )
387 define Package
/ruby-rdoc
/install
388 $(INSTALL_DIR
) $(1)/usr
/bin
389 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
390 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
391 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
392 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
395 define Package
/ruby-rake
/install
396 $(INSTALL_DIR
) $(1)/usr
/bin
397 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
398 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
399 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
400 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
403 define Package
/ruby-readline
/install
404 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
405 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
406 ) |
( cd
$(1); $(TAR
) -xf
- )
409 define Package
/ruby-rexml
/install
410 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
411 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
415 define Package
/ruby-rss
/install
416 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
417 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
418 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
421 define Package
/ruby-unit
/install
422 $(INSTALL_DIR
) $(1)/usr
/bin
423 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
424 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
425 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
428 define Package
/ruby-webrick
/install
429 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
430 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
431 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
434 define Package
/ruby-xmlrpc
/install
435 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
436 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
439 define Package
/ruby-yaml
/install
440 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
441 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
442 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
443 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
444 ) |
( cd
$(1); $(TAR
) -xf
- )
447 define Package
/ruby-zlib
/install
448 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
449 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
450 ) |
( cd
$(1); $(TAR
) -xf
- )
453 define Build
/InstallDev
454 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
456 ) |
( cd
$(1); $(TAR
) -xf
- )
459 $(eval
$(call BuildPackage
,ruby
))
460 $(eval
$(call BuildPackage
,libruby
))
461 $(eval
$(call BuildPackage
,ruby-core
))
462 $(eval
$(call BuildPackage
,ruby-cgi
))
463 $(eval
$(call BuildPackage
,ruby-dl
))
464 $(eval
$(call BuildPackage
,ruby-enc
))
465 $(eval
$(call BuildPackage
,ruby-erb
))
466 $(eval
$(call BuildPackage
,ruby-gdbm
))
467 $(eval
$(call BuildPackage
,ruby-gems
))
468 $(eval
$(call BuildPackage
,ruby-json
))
469 $(eval
$(call BuildPackage
,ruby-irb
))
470 $(eval
$(call BuildPackage
,ruby-ncurses
))
471 $(eval
$(call BuildPackage
,ruby-nkf
))
472 $(eval
$(call BuildPackage
,ruby-openssl
))
473 $(eval
$(call BuildPackage
,ruby-rake
))
474 $(eval
$(call BuildPackage
,ruby-rdoc
))
475 $(eval
$(call BuildPackage
,ruby-readline
))
476 $(eval
$(call BuildPackage
,ruby-rexml
))
477 $(eval
$(call BuildPackage
,ruby-rss
))
478 $(eval
$(call BuildPackage
,ruby-unit
))
479 $(eval
$(call BuildPackage
,ruby-webrick
))
480 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
481 $(eval
$(call BuildPackage
,ruby-yaml
))
482 $(eval
$(call BuildPackage
,ruby-zlib
))
483 $(eval
$(call HostBuild
))