Upgrade 6tunnel to 0.11rc2 (#3777)
[openwrt/svn-archive/archive.git] / lang / ruby / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ruby
12 PKG_VERSION:=1.8.6-p36
13 PKG_RELEASE:=1
14
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:=eb7f25818cb6993839b38d1f21bd4ea1
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ruby/Default
22 SUBMENU:=Ruby
23 SECTION:=lang
24 CATEGORY:=Languages
25 TITLE:=Ruby scripting language
26 URL:=http://www.ruby-lang.org/
27 endef
28
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.
34 endef
35
36 define Package/ruby
37 $(call Package/ruby/Default)
38 TITLE+= (interpreter)
39 DEPENDS:=+libruby
40 endef
41
42 define Package/ruby/description
43 $(call Package/ruby/Default/description)
44 endef
45
46 define Package/libruby
47 $(call Package/ruby/Default)
48 SUBMENU:=
49 SECTION:=libs
50 CATEGORY:=Libraries
51 TITLE+= (shared library)
52 endef
53
54 # Ongoing work to break up ruby's standard library into coherent pieces
55 # with minimal dependencies between them
56
57 define Package/ruby-core
58 $(call Package/ruby/Default)
59 TITLE:=Ruby standard libraries
60 DEPENDS:=ruby
61 endef
62
63 define Package/ruby-cgi
64 $(call Package/ruby/Default)
65 TITLE:= Ruby CGI support toolkit
66 DEPENDS:=ruby
67 endef
68
69 define Package/ruby-erb
70 $(call Package/ruby/Default)
71 TITLE+= (embedded interpreter)
72 DEPENDS:=ruby
73 endef
74
75 define Package/ruby-gdbm
76 $(call Package/ruby/Default)
77 TITLE:=Ruby support for gdbm
78 DEPENDS:=ruby +libgdbm
79 endef
80
81 define Package/ruby-irb
82 $(call Package/ruby/Default)
83 TITLE+= (interactive shell)
84 DEPENDS:=ruby
85 endef
86
87 define Package/ruby-ncurses
88 $(call Package/ruby/Default)
89 TITLE:=Ruby support for ncurses
90 DEPENDS:=ruby +libncurses
91 endef
92
93 define Package/ruby-nkf
94 $(call Package/ruby/Default)
95 TITLE:=Ruby Network Kanji Filter
96 DEPENDS:=ruby
97 endef
98
99 define Package/ruby-openssl
100 $(call Package/ruby/Default)
101 TITLE:=Ruby support for openssl
102 DEPENDS:=ruby +libopenssl
103 endef
104
105 define Package/ruby-rdoc
106 $(call Package/ruby/Default)
107 TITLE+= (documentation generator)
108 DEPENDS:=ruby
109 endef
110
111 define Package/ruby-readline
112 $(call Package/ruby/Default)
113 TITLE:=Ruby support for readline
114 DEPENDS:=ruby +libncurses +libreadline
115 endef
116
117 define Package/ruby-rexml
118 $(call Package/ruby/Default)
119 TITLE:=Ruby XML toolkit
120 DEPENDS:=ruby
121 endef
122
123 define Package/ruby-rss
124 $(call Package/ruby/Default)
125 TITLE:=Ruby RSS toolkit
126 DEPENDS:=ruby
127 endef
128
129 define Package/ruby-soap
130 $(call Package/ruby/Default)
131 TITLE:=Ruby SOAP toolkit
132 DEPENDS:=ruby
133 endef
134
135 define Package/ruby-unit
136 $(call Package/ruby/Default)
137 TITLE:=Ruby unit testing toolkit
138 DEPENDS:=ruby
139 endef
140
141 define Package/ruby-webrick
142 $(call Package/ruby/Default)
143 TITLE:=Ruby Web server toolkit
144 DEPENDS:=ruby
145 endef
146
147 define Package/ruby-wsdl
148 $(call Package/ruby/Default)
149 TITLE:=Ruby WSDL 1.1 toolkit
150 DEPENDS:=ruby
151 endef
152
153 define Package/ruby-xmlrpc
154 $(call Package/ruby/Default)
155 TITLE:=Ruby XML-RPC toolkit
156 DEPENDS:=ruby
157 endef
158
159 define Package/ruby-xsd
160 $(call Package/ruby/Default)
161 TITLE:=Ruby XML Schema Datatypes toolkit
162 DEPENDS:=ruby
163 endef
164
165 define Package/ruby-yaml
166 $(call Package/ruby/Default)
167 TITLE:=Ruby YAML toolkit
168 DEPENDS:=ruby
169 endef
170
171 define Package/ruby-zlib
172 $(call Package/ruby/Default)
173 TITLE:=Ruby support for zlib
174 DEPENDS:=ruby +zlib
175 endef
176
177
178 CONFIGURE_ARGS += \
179 --enable-shared \
180 --enable-static \
181 --disable-rpath \
182 --disable-ipv6 \
183
184 CONFIGURE_VARS += \
185 ac_cv_func_setpgrp_void=yes \
186
187 MAKE_FLAGS += \
188 DESTDIR="$(PKG_INSTALL_DIR)" \
189 SHELL="/bin/bash" \
190 all install
191
192 define Package/ruby/install
193 $(INSTALL_DIR) $(1)/usr/bin
194 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/
195 endef
196
197 define Package/libruby/install
198 $(INSTALL_DIR) $(1)/usr/lib
199 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
200 endef
201
202 define Package/ruby-core/install
203 $(INSTALL_DIR) $(1)/usr/lib
204 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/
205 rm -rf \
206 $(1)/usr/lib/ruby/1.8/*/curses.so \
207 \
208 $(1)/usr/lib/ruby/1.8/*/gdbm.so \
209 \
210 $(1)/usr/lib/ruby/1.8/kconv.rb \
211 $(1)/usr/lib/ruby/1.8/*/nkf.so \
212 \
213 $(1)/usr/lib/ruby/1.8/digest \
214 $(1)/usr/lib/ruby/1.8/digest.rb \
215 $(1)/usr/lib/ruby/1.8/*/digest \
216 $(1)/usr/lib/ruby/1.8/*/digest.so \
217 $(1)/usr/lib/ruby/1.8/openssl \
218 $(1)/usr/lib/ruby/1.8/openssl.rb \
219 $(1)/usr/lib/ruby/1.8/*/openssl.so \
220 $(1)/usr/lib/ruby/1.8/md5.rb \
221 $(1)/usr/lib/ruby/1.8/rmd160.rb \
222 $(1)/usr/lib/ruby/1.8/sha1.rb \
223 $(1)/usr/lib/ruby/1.8/sha2.rb \
224 $(1)/usr/lib/ruby/1.8/drb/ssl.rb \
225 $(1)/usr/lib/ruby/1.8/net/ftptls.rb \
226 $(1)/usr/lib/ruby/1.8/net/https.rb \
227 $(1)/usr/lib/ruby/1.8/net/telnets.rb \
228 $(1)/usr/lib/ruby/1.8/webrick/ssl.rb \
229 \
230 $(1)/usr/lib/ruby/1.8/*/readline.so \
231 $(1)/usr/lib/ruby/1.8/irb/completion.rb \
232 $(1)/usr/lib/ruby/1.8/irb/ext/save-history.rb \
233 \
234 $(1)/usr/lib/ruby/1.8/*/zlib.so \
235 \
236 $(1)/usr/lib/ruby/1.8/erb.rb \
237 \
238 $(1)/usr/lib/ruby/1.8/irb.rb \
239 $(1)/usr/lib/ruby/1.8/irb \
240 \
241 $(1)/usr/lib/ruby/1.8/rdoc \
242 \
243 $(1)/usr/lib/ruby/1.8/cgi \
244 $(1)/usr/lib/ruby/1.8/cgi.rb \
245 $(1)/usr/lib/ruby/1.8/cgi-lib.rb \
246 \
247 $(1)/usr/lib/ruby/1.8/rexml \
248 \
249 $(1)/usr/lib/ruby/1.8/rss \
250 $(1)/usr/lib/ruby/1.8/rss.rb \
251 \
252 $(1)/usr/lib/ruby/1.8/soap \
253 \
254 $(1)/usr/lib/ruby/1.8/rubyunit.rb \
255 $(1)/usr/lib/ruby/1.8/runit \
256 $(1)/usr/lib/ruby/1.8/test \
257 \
258 $(1)/usr/lib/ruby/1.8/webrick \
259 $(1)/usr/lib/ruby/1.8/webrick.rb \
260 \
261 $(1)/usr/lib/ruby/1.8/wsdl \
262 \
263 $(1)/usr/lib/ruby/1.8/xmlrpc \
264 \
265 $(1)/usr/lib/ruby/1.8/xsd \
266 \
267 $(1)/usr/lib/ruby/1.8/yaml \
268 $(1)/usr/lib/ruby/1.8/yaml.rb \
269 $(1)/usr/lib/ruby/1.8/*/syck.so \
270
271 find $(1) -name '*.h' | xargs rm -f
272 endef
273
274 define Package/ruby-cgi/install
275 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
276 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi $(1)/usr/lib/ruby/1.8/
277 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi.rb $(1)/usr/lib/ruby/1.8/
278 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/cgi-lib.rb $(1)/usr/lib/ruby/1.8/
279 endef
280
281 define Package/ruby-erb/install
282 $(INSTALL_DIR) $(1)/usr/bin
283 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
284 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8/
285 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/erb.rb $(1)/usr/lib/ruby/1.8/
286 endef
287
288 define Package/ruby-gdbm/install
289 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
290 usr/lib/ruby/1.8/*/gdbm.so \
291 ) | ( cd $(1); $(TAR) -xf - )
292 endef
293
294 define Package/ruby-irb/install
295 $(INSTALL_DIR) $(1)/usr/bin
296 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
297 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
298 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb $(1)/usr/lib/ruby/1.8/
299 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/irb.rb $(1)/usr/lib/ruby/1.8/
300 endef
301
302 define Package/ruby-ncurses/install
303 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
304 usr/lib/ruby/1.8/*/curses.so \
305 ) | ( cd $(1); $(TAR) -xf - )
306 endef
307
308 define Package/ruby-nkf/install
309 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
310 usr/lib/ruby/1.8/kconv.rb \
311 usr/lib/ruby/1.8/*/nkf.so \
312 ) | ( cd $(1); $(TAR) -xf - )
313 endef
314
315 define Package/ruby-openssl/install
316 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
317 usr/lib/ruby/1.8/digest \
318 usr/lib/ruby/1.8/digest.rb \
319 usr/lib/ruby/1.8/*/digest.so \
320 usr/lib/ruby/1.8/*/digest/*.so \
321 usr/lib/ruby/1.8/openssl \
322 usr/lib/ruby/1.8/openssl.rb \
323 usr/lib/ruby/1.8/*/openssl.so \
324 usr/lib/ruby/1.8/md5.rb \
325 usr/lib/ruby/1.8/rmd160.rb \
326 usr/lib/ruby/1.8/sha1.rb \
327 usr/lib/ruby/1.8/sha2.rb \
328 usr/lib/ruby/1.8/drb/ssl.rb \
329 usr/lib/ruby/1.8/net/ftptls.rb \
330 usr/lib/ruby/1.8/net/https.rb \
331 usr/lib/ruby/1.8/net/telnets.rb \
332 usr/lib/ruby/1.8/webrick/ssl.rb \
333 ) | ( cd $(1); $(TAR) -xf - )
334 endef
335
336 define Package/ruby-rdoc/install
337 $(INSTALL_DIR) $(1)/usr/bin
338 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
339 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
340 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
341 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rdoc $(1)/usr/lib/ruby/1.8/
342 endef
343
344 define Package/ruby-readline/install
345 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
346 usr/lib/ruby/1.8/*/readline.so \
347 usr/lib/ruby/1.8/irb/completion.rb \
348 usr/lib/ruby/1.8/irb/ext/save-history.rb \
349 ) | ( cd $(1); $(TAR) -xf - )
350 endef
351
352 define Package/ruby-rexml/install
353 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
354 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rexml $(1)/usr/lib/ruby/1.8/
355 endef
356
357 define Package/ruby-rss/install
358 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
359 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss $(1)/usr/lib/ruby/1.8/
360 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rss.rb $(1)/usr/lib/ruby/1.8/
361 endef
362
363 define Package/ruby-soap/install
364 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
365 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/soap $(1)/usr/lib/ruby/1.8/
366 endef
367
368 define Package/ruby-unit/install
369 $(INSTALL_DIR) $(1)/usr/bin
370 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/
371 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
372 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/rubyunit.rb $(1)/usr/lib/ruby/1.8/
373 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/runit $(1)/usr/lib/ruby/1.8/
374 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/test $(1)/usr/lib/ruby/1.8/
375 endef
376
377 define Package/ruby-webrick/install
378 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
379 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick $(1)/usr/lib/ruby/1.8/
380 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/webrick.rb $(1)/usr/lib/ruby/1.8/
381 endef
382
383 define Package/ruby-wsdl/install
384 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
385 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/wsdl $(1)/usr/lib/ruby/1.8/
386 endef
387
388 define Package/ruby-xmlrpc/install
389 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
390 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xmlrpc $(1)/usr/lib/ruby/1.8/
391 endef
392
393 define Package/ruby-xsd/install
394 $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
395 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/1.8/xsd $(1)/usr/lib/ruby/1.8/
396 endef
397
398 define Package/ruby-yaml/install
399 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
400 usr/lib/ruby/1.8/yaml \
401 usr/lib/ruby/1.8/yaml.rb \
402 usr/lib/ruby/1.8/*/syck.so \
403 ) | ( cd $(1); $(TAR) -xf - )
404 endef
405
406 define Package/ruby-zlib/install
407 ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
408 usr/lib/ruby/1.8/*/zlib.so \
409 ) | ( cd $(1); $(TAR) -xf - )
410 endef
411
412 $(eval $(call BuildPackage,ruby))
413 $(eval $(call BuildPackage,libruby))
414 $(eval $(call BuildPackage,ruby-core))
415 $(eval $(call BuildPackage,ruby-cgi))
416 $(eval $(call BuildPackage,ruby-erb))
417 $(eval $(call BuildPackage,ruby-gdbm))
418 $(eval $(call BuildPackage,ruby-irb))
419 $(eval $(call BuildPackage,ruby-ncurses))
420 $(eval $(call BuildPackage,ruby-nkf))
421 $(eval $(call BuildPackage,ruby-openssl))
422 $(eval $(call BuildPackage,ruby-rdoc))
423 $(eval $(call BuildPackage,ruby-readline))
424 $(eval $(call BuildPackage,ruby-rexml))
425 $(eval $(call BuildPackage,ruby-rss))
426 $(eval $(call BuildPackage,ruby-soap))
427 $(eval $(call BuildPackage,ruby-unit))
428 $(eval $(call BuildPackage,ruby-webrick))
429 $(eval $(call BuildPackage,ruby-wsdl))
430 $(eval $(call BuildPackage,ruby-xmlrpc))
431 $(eval $(call BuildPackage,ruby-xsd))
432 $(eval $(call BuildPackage,ruby-yaml))
433 $(eval $(call BuildPackage,ruby-zlib))
434
435 $(eval $(call RequireCommand,ruby, \
436 $(PKG_NAME) requires ruby installed on the host-system. \
437 ))
438