2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_VERSION:=1.8.6-p287
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.ruby-lang.org/pub/ruby/1.8/
16 PKG_MD5SUM:=80b5f3db12531d36e6c81fac6d05dda9
18 include $(INCLUDE_DIR)/package.mk
20 define Package/ruby/Default
24 TITLE:=Ruby scripting language
25 URL:=http://www.ruby-lang.org/
28 define Package/ruby/Default/description
29 Ruby is the interpreted scripting language for quick and easy
30 object-oriented programming. It has many features to process text files
31 and to do system management tasks (as in perl). It is simple,
32 straight-forward, and extensible.
36 $(call Package/ruby/Default)
41 define Package/ruby/description
42 $(call Package/ruby/Default/description)
45 define Package/libruby
46 $(call Package/ruby/Default)
50 TITLE+= (shared library)
53 # Ongoing work to break up ruby's standard library into coherent pieces
54 # with minimal dependencies between them
56 define Package/ruby-core
57 $(call Package/ruby/Default)
58 TITLE:=Ruby standard libraries
62 define Package/ruby-cgi
63 $(call Package/ruby/Default)
64 TITLE:= Ruby CGI support toolkit
68 define Package/ruby-erb
69 $(call Package/ruby/Default)
70 TITLE+= (embedded interpreter)
74 define Package/ruby-gdbm
75 $(call Package/ruby/Default)
76 TITLE:=Ruby support for gdbm
77 DEPENDS:=ruby +libgdbm
80 define Package/ruby-irb
81 $(call Package/ruby/Default)
82 TITLE+= (interactive shell)
86 define Package/ruby-ncurses
87 $(call Package/ruby/Default)
88 TITLE:=Ruby support for ncurses
89 DEPENDS:=ruby +libncurses
92 define Package/ruby-nkf
93 $(call Package/ruby/Default)
94 TITLE:=Ruby Network Kanji Filter
98 define Package/ruby-openssl
99 $(call Package/ruby/Default)
100 TITLE:=Ruby support for openssl
101 DEPENDS:=ruby +libopenssl
104 define Package/ruby-rdoc
105 $(call Package/ruby/Default)
106 TITLE+= (documentation generator)
110 define Package/ruby-readline
111 $(call Package/ruby/Default)
112 TITLE:=Ruby support for readline
113 DEPENDS:=ruby +libncurses +libreadline
116 define Package/ruby-rexml
117 $(call Package/ruby/Default)
118 TITLE:=Ruby XML toolkit
122 define Package/ruby-rss
123 $(call Package/ruby/Default)
124 TITLE:=Ruby RSS toolkit
128 define Package/ruby-soap
129 $(call Package/ruby/Default)
130 TITLE:=Ruby SOAP toolkit
134 define Package/ruby-unit
135 $(call Package/ruby/Default)
136 TITLE:=Ruby unit testing toolkit
140 define Package/ruby-webrick
141 $(call Package/ruby/Default)
142 TITLE:=Ruby Web server toolkit
146 define Package/ruby-wsdl
147 $(call Package/ruby/Default)
148 TITLE:=Ruby WSDL 1.1 toolkit
152 define Package/ruby-xmlrpc
153 $(call Package/ruby/Default)
154 TITLE:=Ruby XML-RPC toolkit
158 define Package/ruby-xsd
159 $(call Package/ruby/Default)
160 TITLE:=Ruby XML Schema Datatypes toolkit
164 define Package/ruby-yaml
165 $(call Package/ruby/Default)
166 TITLE:=Ruby YAML toolkit
170 define Package/ruby-zlib
171 $(call Package/ruby/Default)
172 TITLE:=Ruby support for zlib
182 --enable-wide-getaddrinfo \
185 ac_cv_func_setpgrp_void=yes
187 TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
190 DESTDIR="$(PKG_INSTALL_DIR)" \
194 define Package/ruby/install
195 $(INSTALL_DIR) $(1)/usr/bin
196 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/
199 define Package/libruby/install
200 $(INSTALL_DIR) $(1)/usr/lib
201 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
204 define Package/ruby-core/install
205 $(INSTALL_DIR) $(1)/usr/lib
206 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/
208 $(1)/usr/lib/ruby/1.8/*/curses.so \
210 $(1)/usr/lib/ruby/1.8/*/gdbm.so \
212 $(1)/usr/lib/ruby/1.8/kconv.rb \
213 $(1)/usr/lib/ruby/1.8/*/nkf.so \
215 $(1)/usr/lib/ruby/1.8/digest \
216 $(1)/usr/lib/ruby/1.8/digest.rb \
217 $(1)/usr/lib/ruby/1.8/*/digest \
218 $(1)/usr/lib/ruby/1.8/*/digest.so \
219 $(1)/usr/lib/ruby/1.8/openssl \
220 $(1)/usr/lib/ruby/1.8/openssl.rb \
221 $(1)/usr/lib/ruby/1.8/*/openssl.so \
222 $(1)/usr/lib/ruby/1.8/md5.rb \
223 $(1)/usr/lib/ruby/1.8/rmd160.rb \
224 $(1)/usr/lib/ruby/1.8/sha1.rb \
225 $(1)/usr/lib/ruby/1.8/sha2.rb \
226 $(1)/usr/lib/ruby/1.8/drb/ssl.rb \
227 $(1)/usr/lib/ruby/1.8/net/ftptls.rb \
228 $(1)/usr/lib/ruby/1.8/net/https.rb \
229 $(1)/usr/lib/ruby/1.8/net/telnets.rb \
230 $(1)/usr/lib/ruby/1.8/webrick/ssl.rb \
232 $(1)/usr/lib/ruby/1.8/*/readline.so \
233 $(1)/usr/lib/ruby/1.8/irb/completion.rb \
234 $(1)/usr/lib/ruby/1.8/irb/ext/save-history.rb \
236 $(1)/usr/lib/ruby/1.8/*/zlib.so \
238 $(1)/usr/lib/ruby/1.8/erb.rb \
240 $(1)/usr/lib/ruby/1.8/irb.rb \
241 $(1)/usr/lib/ruby/1.8/irb \
243 $(1)/usr/lib/ruby/1.8/rdoc \
245 $(1)/usr/lib/ruby/1.8/cgi \
246 $(1)/usr/lib/ruby/1.8/cgi.rb \
247 $(1)/usr/lib/ruby/1.8/cgi-lib.rb \
249 $(1)/usr/lib/ruby/1.8/rexml \
251 $(1)/usr/lib/ruby/1.8/rss \
252 $(1)/usr/lib/ruby/1.8/rss.rb \
254 $(1)/usr/lib/ruby/1.8/soap \
256 $(1)/usr/lib/ruby/1.8/rubyunit.rb \
257 $(1)/usr/lib/ruby/1.8/runit \
258 $(1)/usr/lib/ruby/1.8/test \
260 $(1)/usr/lib/ruby/1.8/webrick \
261 $(1)/usr/lib/ruby/1.8/webrick.rb \
263 $(1)/usr/lib/ruby/1.8/wsdl \
265 $(1)/usr/lib/ruby/1.8/xmlrpc \
267 $(1)/usr/lib/ruby/1.8/xsd \
269 $(1)/usr/lib/ruby/1.8/yaml \
270 $(1)/usr/lib/ruby/1.8/yaml.rb \
271 $(1)/usr/lib/ruby/1.8/*/syck.so \
273 find $(1) -name '*.h' | xargs rm -f
276 define Package/ruby-cgi/install
277 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
278 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi $(1)/usr/lib/ruby/1.8/
279 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi.rb $(1)/usr/lib/ruby/1.8/
280 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi-lib.rb $(1)/usr/lib/ruby/1.8/
283 define Package/ruby-erb/install
284 $(INSTALL_DIR) $(1)/usr/bin
285 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
286 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8/
287 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/erb.rb $(1)/usr/lib/ruby/1.8/
290 define Package/ruby-gdbm/install
291 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
292 usr/lib/ruby/1.8/*/gdbm.so \
293 ) | ( cd $(1); $(TAR) -xf - )
296 define Package/ruby-irb/install
297 $(INSTALL_DIR) $(1)/usr/bin
298 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
299 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
300 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb $(1)/usr/lib/ruby/1.8/
301 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb.rb $(1)/usr/lib/ruby/1.8/
304 define Package/ruby-ncurses/install
305 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
306 usr/lib/ruby/1.8/*/curses.so \
307 ) | ( cd $(1); $(TAR) -xf - )
310 define Package/ruby-nkf/install
311 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
312 usr/lib/ruby/1.8/kconv.rb \
313 usr/lib/ruby/1.8/*/nkf.so \
314 ) | ( cd $(1); $(TAR) -xf - )
317 define Package/ruby-openssl/install
318 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
319 usr/lib/ruby/1.8/digest \
320 usr/lib/ruby/1.8/digest.rb \
321 usr/lib/ruby/1.8/*/digest.so \
322 usr/lib/ruby/1.8/*/digest/*.so \
323 usr/lib/ruby/1.8/openssl \
324 usr/lib/ruby/1.8/openssl.rb \
325 usr/lib/ruby/1.8/*/openssl.so \
326 usr/lib/ruby/1.8/md5.rb \
327 usr/lib/ruby/1.8/rmd160.rb \
328 usr/lib/ruby/1.8/sha1.rb \
329 usr/lib/ruby/1.8/sha2.rb \
330 usr/lib/ruby/1.8/drb/ssl.rb \
331 usr/lib/ruby/1.8/net/ftptls.rb \
332 usr/lib/ruby/1.8/net/https.rb \
333 usr/lib/ruby/1.8/net/telnets.rb \
334 usr/lib/ruby/1.8/webrick/ssl.rb \
335 ) | ( cd $(1); $(TAR) -xf - )
338 define Package/ruby-rdoc/install
339 $(INSTALL_DIR) $(1)/usr/bin
340 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
341 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
342 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
343 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rdoc $(1)/usr/lib/ruby/1.8/
346 define Package/ruby-readline/install
347 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
348 usr/lib/ruby/1.8/*/readline.so \
349 usr/lib/ruby/1.8/irb/completion.rb \
350 usr/lib/ruby/1.8/irb/ext/save-history.rb \
351 ) | ( cd $(1); $(TAR) -xf - )
354 define Package/ruby-rexml/install
355 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
356 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rexml $(1)/usr/lib/ruby/1.8/
359 define Package/ruby-rss/install
360 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
361 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss $(1)/usr/lib/ruby/1.8/
362 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss.rb $(1)/usr/lib/ruby/1.8/
365 define Package/ruby-soap/install
366 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
367 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/soap $(1)/usr/lib/ruby/1.8/
370 define Package/ruby-unit/install
371 $(INSTALL_DIR) $(1)/usr/bin
372 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/
373 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
374 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rubyunit.rb $(1)/usr/lib/ruby/1.8/
375 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/runit $(1)/usr/lib/ruby/1.8/
376 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/test $(1)/usr/lib/ruby/1.8/
379 define Package/ruby-webrick/install
380 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
381 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick $(1)/usr/lib/ruby/1.8/
382 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick.rb $(1)/usr/lib/ruby/1.8/
385 define Package/ruby-wsdl/install
386 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
387 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/wsdl $(1)/usr/lib/ruby/1.8/
390 define Package/ruby-xmlrpc/install
391 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
392 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xmlrpc $(1)/usr/lib/ruby/1.8/
395 define Package/ruby-xsd/install
396 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
397 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xsd $(1)/usr/lib/ruby/1.8/
400 define Package/ruby-yaml/install
401 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
402 usr/lib/ruby/1.8/yaml \
403 usr/lib/ruby/1.8/yaml.rb \
404 usr/lib/ruby/1.8/*/syck.so \
405 ) | ( cd $(1); $(TAR) -xf - )
408 define Package/ruby-zlib/install
409 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
410 usr/lib/ruby/1.8/*/zlib.so \
411 ) | ( cd $(1); $(TAR) -xf - )
414 $(eval $(call BuildPackage,ruby))
415 $(eval $(call BuildPackage,libruby))
416 $(eval $(call BuildPackage,ruby-core))
417 $(eval $(call BuildPackage,ruby-cgi))
418 $(eval $(call BuildPackage,ruby-erb))
419 $(eval $(call BuildPackage,ruby-gdbm))
420 $(eval $(call BuildPackage,ruby-irb))
421 $(eval $(call BuildPackage,ruby-ncurses))
422 $(eval $(call BuildPackage,ruby-nkf))
423 $(eval $(call BuildPackage,ruby-openssl))
424 $(eval $(call BuildPackage,ruby-rdoc))
425 $(eval $(call BuildPackage,ruby-readline))
426 $(eval $(call BuildPackage,ruby-rexml))
427 $(eval $(call BuildPackage,ruby-rss))
428 $(eval $(call BuildPackage,ruby-soap))
429 $(eval $(call BuildPackage,ruby-unit))
430 $(eval $(call BuildPackage,ruby-webrick))
431 $(eval $(call BuildPackage,ruby-wsdl))
432 $(eval $(call BuildPackage,ruby-xmlrpc))
433 $(eval $(call BuildPackage,ruby-xsd))
434 $(eval $(call BuildPackage,ruby-yaml))
435 $(eval $(call BuildPackage,ruby-zlib))
437 $(eval $(call RequireCommand,ruby, \
438 $(PKG_NAME) requires ruby installed on the host-system. \