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.
9 include $(TOPDIR)/rules.mk
12 PKG_VERSION:=1.8.6-p287
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.ruby-lang.org/pub/ruby/1.8/
17 PKG_MD5SUM:=80b5f3db12531d36e6c81fac6d05dda9
19 include $(INCLUDE_DIR)/package.mk
21 define Package/ruby/Default
25 TITLE:=Ruby scripting language
26 URL:=http://www.ruby-lang.org/
29 define Package/ruby/Default/description
30 Ruby is the interpreted scripting language for quick and easy
31 object-oriented programming. It has many features to process text files
32 and to do system management tasks (as in perl). It is simple,
33 straight-forward, and extensible.
37 $(call Package/ruby/Default)
42 define Package/ruby/description
43 $(call Package/ruby/Default/description)
46 define Package/libruby
47 $(call Package/ruby/Default)
51 TITLE+= (shared library)
54 # Ongoing work to break up ruby's standard library into coherent pieces
55 # with minimal dependencies between them
57 define Package/ruby-core
58 $(call Package/ruby/Default)
59 TITLE:=Ruby standard libraries
63 define Package/ruby-cgi
64 $(call Package/ruby/Default)
65 TITLE:= Ruby CGI support toolkit
69 define Package/ruby-erb
70 $(call Package/ruby/Default)
71 TITLE+= (embedded interpreter)
75 define Package/ruby-gdbm
76 $(call Package/ruby/Default)
77 TITLE:=Ruby support for gdbm
78 DEPENDS:=ruby +libgdbm
81 define Package/ruby-irb
82 $(call Package/ruby/Default)
83 TITLE+= (interactive shell)
87 define Package/ruby-ncurses
88 $(call Package/ruby/Default)
89 TITLE:=Ruby support for ncurses
90 DEPENDS:=ruby +libncurses
93 define Package/ruby-nkf
94 $(call Package/ruby/Default)
95 TITLE:=Ruby Network Kanji Filter
99 define Package/ruby-openssl
100 $(call Package/ruby/Default)
101 TITLE:=Ruby support for openssl
102 DEPENDS:=ruby +libopenssl
105 define Package/ruby-rdoc
106 $(call Package/ruby/Default)
107 TITLE+= (documentation generator)
111 define Package/ruby-readline
112 $(call Package/ruby/Default)
113 TITLE:=Ruby support for readline
114 DEPENDS:=ruby +libncurses +libreadline
117 define Package/ruby-rexml
118 $(call Package/ruby/Default)
119 TITLE:=Ruby XML toolkit
123 define Package/ruby-rss
124 $(call Package/ruby/Default)
125 TITLE:=Ruby RSS toolkit
129 define Package/ruby-soap
130 $(call Package/ruby/Default)
131 TITLE:=Ruby SOAP toolkit
135 define Package/ruby-unit
136 $(call Package/ruby/Default)
137 TITLE:=Ruby unit testing toolkit
141 define Package/ruby-webrick
142 $(call Package/ruby/Default)
143 TITLE:=Ruby Web server toolkit
147 define Package/ruby-wsdl
148 $(call Package/ruby/Default)
149 TITLE:=Ruby WSDL 1.1 toolkit
153 define Package/ruby-xmlrpc
154 $(call Package/ruby/Default)
155 TITLE:=Ruby XML-RPC toolkit
159 define Package/ruby-xsd
160 $(call Package/ruby/Default)
161 TITLE:=Ruby XML Schema Datatypes toolkit
165 define Package/ruby-yaml
166 $(call Package/ruby/Default)
167 TITLE:=Ruby YAML toolkit
171 define Package/ruby-zlib
172 $(call Package/ruby/Default)
173 TITLE:=Ruby support for zlib
183 --enable-wide-getaddrinfo \
186 ac_cv_func_setpgrp_void=yes
188 TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
191 DESTDIR="$(PKG_INSTALL_DIR)" \
195 define Package/ruby/install
196 $(INSTALL_DIR) $(1)/usr/bin
197 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/
200 define Package/libruby/install
201 $(INSTALL_DIR) $(1)/usr/lib
202 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
205 define Package/ruby-core/install
206 $(INSTALL_DIR) $(1)/usr/lib
207 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/
209 $(1)/usr/lib/ruby/1.8/*/curses.so \
211 $(1)/usr/lib/ruby/1.8/*/gdbm.so \
213 $(1)/usr/lib/ruby/1.8/kconv.rb \
214 $(1)/usr/lib/ruby/1.8/*/nkf.so \
216 $(1)/usr/lib/ruby/1.8/digest \
217 $(1)/usr/lib/ruby/1.8/digest.rb \
218 $(1)/usr/lib/ruby/1.8/*/digest \
219 $(1)/usr/lib/ruby/1.8/*/digest.so \
220 $(1)/usr/lib/ruby/1.8/openssl \
221 $(1)/usr/lib/ruby/1.8/openssl.rb \
222 $(1)/usr/lib/ruby/1.8/*/openssl.so \
223 $(1)/usr/lib/ruby/1.8/md5.rb \
224 $(1)/usr/lib/ruby/1.8/rmd160.rb \
225 $(1)/usr/lib/ruby/1.8/sha1.rb \
226 $(1)/usr/lib/ruby/1.8/sha2.rb \
227 $(1)/usr/lib/ruby/1.8/drb/ssl.rb \
228 $(1)/usr/lib/ruby/1.8/net/ftptls.rb \
229 $(1)/usr/lib/ruby/1.8/net/https.rb \
230 $(1)/usr/lib/ruby/1.8/net/telnets.rb \
231 $(1)/usr/lib/ruby/1.8/webrick/ssl.rb \
233 $(1)/usr/lib/ruby/1.8/*/readline.so \
234 $(1)/usr/lib/ruby/1.8/irb/completion.rb \
235 $(1)/usr/lib/ruby/1.8/irb/ext/save-history.rb \
237 $(1)/usr/lib/ruby/1.8/*/zlib.so \
239 $(1)/usr/lib/ruby/1.8/erb.rb \
241 $(1)/usr/lib/ruby/1.8/irb.rb \
242 $(1)/usr/lib/ruby/1.8/irb \
244 $(1)/usr/lib/ruby/1.8/rdoc \
246 $(1)/usr/lib/ruby/1.8/cgi \
247 $(1)/usr/lib/ruby/1.8/cgi.rb \
248 $(1)/usr/lib/ruby/1.8/cgi-lib.rb \
250 $(1)/usr/lib/ruby/1.8/rexml \
252 $(1)/usr/lib/ruby/1.8/rss \
253 $(1)/usr/lib/ruby/1.8/rss.rb \
255 $(1)/usr/lib/ruby/1.8/soap \
257 $(1)/usr/lib/ruby/1.8/rubyunit.rb \
258 $(1)/usr/lib/ruby/1.8/runit \
259 $(1)/usr/lib/ruby/1.8/test \
261 $(1)/usr/lib/ruby/1.8/webrick \
262 $(1)/usr/lib/ruby/1.8/webrick.rb \
264 $(1)/usr/lib/ruby/1.8/wsdl \
266 $(1)/usr/lib/ruby/1.8/xmlrpc \
268 $(1)/usr/lib/ruby/1.8/xsd \
270 $(1)/usr/lib/ruby/1.8/yaml \
271 $(1)/usr/lib/ruby/1.8/yaml.rb \
272 $(1)/usr/lib/ruby/1.8/*/syck.so \
274 find $(1) -name '*.h' | xargs rm -f
277 define Package/ruby-cgi/install
278 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
279 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi $(1)/usr/lib/ruby/1.8/
280 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi.rb $(1)/usr/lib/ruby/1.8/
281 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi-lib.rb $(1)/usr/lib/ruby/1.8/
284 define Package/ruby-erb/install
285 $(INSTALL_DIR) $(1)/usr/bin
286 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
287 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8/
288 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/erb.rb $(1)/usr/lib/ruby/1.8/
291 define Package/ruby-gdbm/install
292 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
293 usr/lib/ruby/1.8/*/gdbm.so \
294 ) | ( cd $(1); $(TAR) -xf - )
297 define Package/ruby-irb/install
298 $(INSTALL_DIR) $(1)/usr/bin
299 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
300 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
301 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb $(1)/usr/lib/ruby/1.8/
302 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb.rb $(1)/usr/lib/ruby/1.8/
305 define Package/ruby-ncurses/install
306 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
307 usr/lib/ruby/1.8/*/curses.so \
308 ) | ( cd $(1); $(TAR) -xf - )
311 define Package/ruby-nkf/install
312 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
313 usr/lib/ruby/1.8/kconv.rb \
314 usr/lib/ruby/1.8/*/nkf.so \
315 ) | ( cd $(1); $(TAR) -xf - )
318 define Package/ruby-openssl/install
319 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
320 usr/lib/ruby/1.8/digest \
321 usr/lib/ruby/1.8/digest.rb \
322 usr/lib/ruby/1.8/*/digest.so \
323 usr/lib/ruby/1.8/*/digest/*.so \
324 usr/lib/ruby/1.8/openssl \
325 usr/lib/ruby/1.8/openssl.rb \
326 usr/lib/ruby/1.8/*/openssl.so \
327 usr/lib/ruby/1.8/md5.rb \
328 usr/lib/ruby/1.8/rmd160.rb \
329 usr/lib/ruby/1.8/sha1.rb \
330 usr/lib/ruby/1.8/sha2.rb \
331 usr/lib/ruby/1.8/drb/ssl.rb \
332 usr/lib/ruby/1.8/net/ftptls.rb \
333 usr/lib/ruby/1.8/net/https.rb \
334 usr/lib/ruby/1.8/net/telnets.rb \
335 usr/lib/ruby/1.8/webrick/ssl.rb \
336 ) | ( cd $(1); $(TAR) -xf - )
339 define Package/ruby-rdoc/install
340 $(INSTALL_DIR) $(1)/usr/bin
341 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
342 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
343 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
344 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rdoc $(1)/usr/lib/ruby/1.8/
347 define Package/ruby-readline/install
348 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
349 usr/lib/ruby/1.8/*/readline.so \
350 usr/lib/ruby/1.8/irb/completion.rb \
351 usr/lib/ruby/1.8/irb/ext/save-history.rb \
352 ) | ( cd $(1); $(TAR) -xf - )
355 define Package/ruby-rexml/install
356 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
357 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rexml $(1)/usr/lib/ruby/1.8/
360 define Package/ruby-rss/install
361 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
362 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss $(1)/usr/lib/ruby/1.8/
363 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss.rb $(1)/usr/lib/ruby/1.8/
366 define Package/ruby-soap/install
367 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
368 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/soap $(1)/usr/lib/ruby/1.8/
371 define Package/ruby-unit/install
372 $(INSTALL_DIR) $(1)/usr/bin
373 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/
374 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
375 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rubyunit.rb $(1)/usr/lib/ruby/1.8/
376 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/runit $(1)/usr/lib/ruby/1.8/
377 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/test $(1)/usr/lib/ruby/1.8/
380 define Package/ruby-webrick/install
381 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
382 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick $(1)/usr/lib/ruby/1.8/
383 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick.rb $(1)/usr/lib/ruby/1.8/
386 define Package/ruby-wsdl/install
387 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
388 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/wsdl $(1)/usr/lib/ruby/1.8/
391 define Package/ruby-xmlrpc/install
392 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
393 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xmlrpc $(1)/usr/lib/ruby/1.8/
396 define Package/ruby-xsd/install
397 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
398 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xsd $(1)/usr/lib/ruby/1.8/
401 define Package/ruby-yaml/install
402 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
403 usr/lib/ruby/1.8/yaml \
404 usr/lib/ruby/1.8/yaml.rb \
405 usr/lib/ruby/1.8/*/syck.so \
406 ) | ( cd $(1); $(TAR) -xf - )
409 define Package/ruby-zlib/install
410 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
411 usr/lib/ruby/1.8/*/zlib.so \
412 ) | ( cd $(1); $(TAR) -xf - )
415 $(eval $(call BuildPackage,ruby))
416 $(eval $(call BuildPackage,libruby))
417 $(eval $(call BuildPackage,ruby-core))
418 $(eval $(call BuildPackage,ruby-cgi))
419 $(eval $(call BuildPackage,ruby-erb))
420 $(eval $(call BuildPackage,ruby-gdbm))
421 $(eval $(call BuildPackage,ruby-irb))
422 $(eval $(call BuildPackage,ruby-ncurses))
423 $(eval $(call BuildPackage,ruby-nkf))
424 $(eval $(call BuildPackage,ruby-openssl))
425 $(eval $(call BuildPackage,ruby-rdoc))
426 $(eval $(call BuildPackage,ruby-readline))
427 $(eval $(call BuildPackage,ruby-rexml))
428 $(eval $(call BuildPackage,ruby-rss))
429 $(eval $(call BuildPackage,ruby-soap))
430 $(eval $(call BuildPackage,ruby-unit))
431 $(eval $(call BuildPackage,ruby-webrick))
432 $(eval $(call BuildPackage,ruby-wsdl))
433 $(eval $(call BuildPackage,ruby-xmlrpc))
434 $(eval $(call BuildPackage,ruby-xsd))
435 $(eval $(call BuildPackage,ruby-yaml))
436 $(eval $(call BuildPackage,ruby-zlib))
438 $(eval $(call RequireCommand,ruby, \
439 $(PKG_NAME) requires ruby installed on the host-system. \