2 # Copyright (C) 2006-2014 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
:=http
://cache.ruby-lang.org
/pub
/ruby
/$(PKG_LIBVER
)/
25 PKG_MD5SUM
:=ed9b8565bdeccb401d628ec8d54a0774
26 PKG_MAINTAINER
:=Luiz Angelo Daros de Luca
<luizluca@gmail.com
>
27 PKG_LICENSE
:=BSD-2-Clause
28 PKG_LICENSE_FILE
:=COPYING
30 PKG_BUILD_DEPENDS
:=ruby
/host
35 include $(INCLUDE_DIR
)/host-build.mk
36 include $(INCLUDE_DIR
)/package.mk
37 include $(INCLUDE_DIR
)/nls.mk
39 define Package
/ruby
/Default
43 TITLE
:=Ruby scripting language
44 URL
:=http
://www.ruby-lang.org
/
47 define Package
/ruby
/Default
/description
48 Ruby is the interpreted scripting language for quick and easy
49 object-oriented programming. It has many features to process text files
50 and to do system management tasks
(as in perl
). It is simple
,
51 straight-forward
, and extensible.
55 $(call Package
/ruby
/Default
)
60 define Package
/ruby
/description
61 $(call Package
/ruby
/Default
/description
)
64 define Package
/libruby
65 $(call Package
/ruby
/Default
)
69 TITLE
+= (shared library
)
70 DEPENDS
+= +libpthread
+librt
+libgmp
73 # Ongoing work to break up ruby's standard library into coherent pieces
74 # with minimal dependencies between them
76 define Package
/ruby-core
77 $(call Package
/ruby
/Default
)
78 TITLE
:=Ruby standard libraries
79 DEPENDS
:=ruby
+libdb47
+libffi
82 define Package
/ruby-cgi
83 $(call Package
/ruby
/Default
)
84 TITLE
:=Ruby CGI support toolkit
88 define Package
/ruby-dl
89 $(call Package
/ruby
/Default
)
90 TITLE
+= (dynamic linker support
) (adds
5MB
+)
94 define Package
/ruby-enc
95 $(call Package
/ruby
/Default
)
96 TITLE
+= (character re-coding library
) (adds
2MB
+)
100 define Package
/ruby-erb
101 $(call Package
/ruby
/Default
)
102 TITLE
+= (embedded interpreter
)
106 define Package
/ruby-gdbm
107 $(call Package
/ruby
/Default
)
108 TITLE
:=Ruby support for gdbm
109 DEPENDS
:=ruby
+libgdbm
112 define Package
/ruby-gems
113 $(call Package
/ruby
/Default
)
114 TITLE
:=Ruby gems packet management
115 DEPENDS
:=ruby
+ruby-yaml
+ruby-zlib
+ruby-openssl
+ruby-webrick
+ruby-erb
118 define Package
/ruby-irb
119 $(call Package
/ruby
/Default
)
120 TITLE
+= (interactive
shell)
121 DEPENDS
:=ruby
+ruby-core
124 define Package
/ruby-json
125 $(call Package
/ruby
/Default
)
126 TITLE
:=Ruby support for JSON
130 define Package
/ruby-nkf
131 $(call Package
/ruby
/Default
)
132 TITLE
:=Ruby Network Kanji Filter
136 define Package
/ruby-openssl
137 $(call Package
/ruby
/Default
)
138 TITLE
:=Ruby support for openssl
139 DEPENDS
:=ruby
+libopenssl
142 define Package
/ruby-rdoc
143 $(call Package
/ruby
/Default
)
144 TITLE
+= (documentation generator
)
148 define Package
/ruby-rake
149 $(call Package
/ruby
/Default
)
150 TITLE
+=Ruby Rake
(make replacement
)
154 define Package
/ruby-readline
155 $(call Package
/ruby
/Default
)
156 TITLE
:=Ruby support for readline
157 DEPENDS
:=ruby
+libncurses
+libreadline
160 define Package
/ruby-rexml
161 $(call Package
/ruby
/Default
)
162 TITLE
:=Ruby XML toolkit
166 define Package
/ruby-rss
167 $(call Package
/ruby
/Default
)
168 TITLE
:=Ruby RSS toolkit
172 define Package
/ruby-unit
173 $(call Package
/ruby
/Default
)
174 TITLE
:=Ruby unit testing toolkit
178 define Package
/ruby-webrick
179 $(call Package
/ruby
/Default
)
180 TITLE
:=Ruby Web server toolkit
184 define Package
/ruby-xmlrpc
185 $(call Package
/ruby
/Default
)
186 TITLE
:=Ruby XML-RPC toolkit
190 define Package
/ruby-yaml
191 $(call Package
/ruby
/Default
)
192 TITLE
:=Ruby YAML toolkit
196 define Package
/ruby-zlib
197 $(call Package
/ruby
/Default
)
198 TITLE
:=Ruby support for zlib
202 HOST_CONFIGURE_ARGS
+= \
203 --disable-install-doc \
204 --disable-install-rdoc \
205 --disable-install-capi \
206 --with-static-linked-ext \
213 --with-ruby-version
=minor \
214 --with-iconv-dir
=$(ICONV_PREFIX
) \
216 TARGET_LDFLAGS
+= -L
$(PKG_BUILD_DIR
)
219 DESTDIR
="$(PKG_INSTALL_DIR)" \
222 define Package
/ruby
/install
223 $(INSTALL_DIR
) $(1)/usr
/bin
224 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ruby
$(1)/usr
/bin
/
227 define Package
/libruby
/install
228 $(INSTALL_DIR
) $(1)/usr
/lib
229 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libruby.so.
* $(1)/usr
/lib
/
232 define Package
/ruby-core
/install
233 $(INSTALL_DIR
) $(1)/usr
/lib
234 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
$(1)/usr
/lib
/
236 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/curses.so \
238 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
240 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
241 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
243 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
244 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
245 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest \
246 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
247 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
248 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
249 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
250 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
251 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
252 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
/ssl.rb \
254 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
256 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
258 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
259 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/completion.rb \
260 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
/ext
/save-history.rb \
262 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
264 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb \
266 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
267 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
268 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
270 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb \
271 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb \
273 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc \
275 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb \
276 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake \
278 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb \
279 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems \
281 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb \
282 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi \
284 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml \
286 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss \
287 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb \
289 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test \
291 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick \
292 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb \
294 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc \
296 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
297 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
298 $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
300 find
$(1) -name
'*.h' | xargs
rm -f
303 define Package
/ruby-cgi
/install
304 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
305 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
306 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/cgi.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
309 define Package
/ruby-dl
/install
310 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
311 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/dl.so \
312 ) |
( cd
$(1); $(TAR
) -xf
- )
315 define Package
/ruby-enc
/install
316 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
317 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/enc \
318 ) |
( cd
$(1); $(TAR
) -xf
- )
321 define Package
/ruby-erb
/install
322 $(INSTALL_DIR
) $(1)/usr
/bin
323 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/erb
$(1)/usr
/bin
/
324 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
325 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/erb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
328 define Package
/ruby-gdbm
/install
329 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
330 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/gdbm.so \
331 ) |
( cd
$(1); $(TAR
) -xf
- )
334 define Package
/ruby-gems
/install
335 $(INSTALL_DIR
) $(1)/usr
/bin
336 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gem
$(1)/usr
/bin
/
337 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
338 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
339 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rubygems
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
342 define Package
/ruby-irb
/install
343 $(INSTALL_DIR
) $(1)/usr
/bin
344 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/irb
$(1)/usr
/bin
/
345 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
346 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
347 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/irb.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
350 define Package
/ruby-json
/install
351 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
352 usr
/lib
/ruby
/$(PKG_LIBVER
)/json.rb \
353 usr
/lib
/ruby
/$(PKG_LIBVER
)/json \
354 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/json \
355 ) |
( cd
$(1); $(TAR
) -xf
- )
358 define Package
/ruby-nkf
/install
359 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
360 usr
/lib
/ruby
/$(PKG_LIBVER
)/kconv.rb \
361 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/nkf.so \
362 ) |
( cd
$(1); $(TAR
) -xf
- )
365 define Package
/ruby-openssl
/install
366 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
367 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest \
368 usr
/lib
/ruby
/$(PKG_LIBVER
)/digest.rb \
369 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest.so \
370 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/digest
/*.so \
371 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl \
372 usr
/lib
/ruby
/$(PKG_LIBVER
)/openssl.rb \
373 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/openssl.so \
374 usr
/lib
/ruby
/$(PKG_LIBVER
)/drb
/ssl.rb \
375 usr
/lib
/ruby
/$(PKG_LIBVER
)/net
/https.rb \
376 ) |
( cd
$(1); $(TAR
) -xf
- )
379 define Package
/ruby-rdoc
/install
380 $(INSTALL_DIR
) $(1)/usr
/bin
381 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rdoc
$(1)/usr
/bin
/
382 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ri
$(1)/usr
/bin
/
383 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
384 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rdoc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
387 define Package
/ruby-rake
/install
388 $(INSTALL_DIR
) $(1)/usr
/bin
389 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/rake
$(1)/usr
/bin
/
390 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
391 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
392 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rake
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
395 define Package
/ruby-readline
/install
396 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
397 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/readline.so \
398 ) |
( cd
$(1); $(TAR
) -xf
- )
401 define Package
/ruby-rexml
/install
402 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
403 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rexml
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
407 define Package
/ruby-rss
/install
408 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
409 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
410 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/rss.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
413 define Package
/ruby-unit
/install
414 $(INSTALL_DIR
) $(1)/usr
/bin
415 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/testrb
$(1)/usr
/bin
/
416 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
417 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/test $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
420 define Package
/ruby-webrick
/install
421 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
422 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
423 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/webrick.rb
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
426 define Package
/ruby-xmlrpc
/install
427 $(INSTALL_DIR
) $(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)
428 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ruby
/$(PKG_LIBVER
)/xmlrpc
$(1)/usr
/lib
/ruby
/$(PKG_LIBVER
)/
431 define Package
/ruby-yaml
/install
432 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
433 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml \
434 usr
/lib
/ruby
/$(PKG_LIBVER
)/yaml.rb \
435 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/syck.so \
436 ) |
( cd
$(1); $(TAR
) -xf
- )
439 define Package
/ruby-zlib
/install
440 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
441 usr
/lib
/ruby
/$(PKG_LIBVER
)/*/zlib.so \
442 ) |
( cd
$(1); $(TAR
) -xf
- )
445 define Build
/InstallDev
446 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) -cf
- \
448 ) |
( cd
$(1); $(TAR
) -xf
- )
451 $(eval
$(call BuildPackage
,ruby
))
452 $(eval
$(call BuildPackage
,libruby
))
453 $(eval
$(call BuildPackage
,ruby-core
))
454 $(eval
$(call BuildPackage
,ruby-cgi
))
455 $(eval
$(call BuildPackage
,ruby-dl
))
456 $(eval
$(call BuildPackage
,ruby-enc
))
457 $(eval
$(call BuildPackage
,ruby-erb
))
458 $(eval
$(call BuildPackage
,ruby-gdbm
))
459 $(eval
$(call BuildPackage
,ruby-gems
))
460 $(eval
$(call BuildPackage
,ruby-json
))
461 $(eval
$(call BuildPackage
,ruby-irb
))
462 $(eval
$(call BuildPackage
,ruby-nkf
))
463 $(eval
$(call BuildPackage
,ruby-openssl
))
464 $(eval
$(call BuildPackage
,ruby-rake
))
465 $(eval
$(call BuildPackage
,ruby-rdoc
))
466 $(eval
$(call BuildPackage
,ruby-readline
))
467 $(eval
$(call BuildPackage
,ruby-rexml
))
468 $(eval
$(call BuildPackage
,ruby-rss
))
469 $(eval
$(call BuildPackage
,ruby-unit
))
470 $(eval
$(call BuildPackage
,ruby-webrick
))
471 $(eval
$(call BuildPackage
,ruby-xmlrpc
))
472 $(eval
$(call BuildPackage
,ruby-yaml
))
473 $(eval
$(call BuildPackage
,ruby-zlib
))
474 $(eval
$(call HostBuild
))