added dillo2 - a lightweight webbrowser based on fltk2
[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-p287
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:=80b5f3db12531d36e6c81fac6d05dda9
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 TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
188
189 MAKE_FLAGS += \
190 DESTDIR="$(PKG_INSTALL_DIR)" \
191 SHELL="/bin/bash" \
192 all install
193
194 define Package/ruby/install
195 $(INSTALL_DIR) $(1)/usr/bin
196 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/
197 endef
198
199 define Package/libruby/install
200 $(INSTALL_DIR) $(1)/usr/lib
201 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
202 endef
203
204 define Package/ruby-core/install
205 $(INSTALL_DIR) $(1)/usr/lib
206 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/
207 rm -rf \
208 $(1)/usr/lib/ruby/1.8/*/curses.so \
209 \
210 $(1)/usr/lib/ruby/1.8/*/gdbm.so \
211 \
212 $(1)/usr/lib/ruby/1.8/kconv.rb \
213 $(1)/usr/lib/ruby/1.8/*/nkf.so \
214 \
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 \
231 \
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 \
235 \
236 $(1)/usr/lib/ruby/1.8/*/zlib.so \
237 \
238 $(1)/usr/lib/ruby/1.8/erb.rb \
239 \
240 $(1)/usr/lib/ruby/1.8/irb.rb \
241 $(1)/usr/lib/ruby/1.8/irb \
242 \
243 $(1)/usr/lib/ruby/1.8/rdoc \
244 \
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 \
248 \
249 $(1)/usr/lib/ruby/1.8/rexml \
250 \
251 $(1)/usr/lib/ruby/1.8/rss \
252 $(1)/usr/lib/ruby/1.8/rss.rb \
253 \
254 $(1)/usr/lib/ruby/1.8/soap \
255 \
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 \
259 \
260 $(1)/usr/lib/ruby/1.8/webrick \
261 $(1)/usr/lib/ruby/1.8/webrick.rb \
262 \
263 $(1)/usr/lib/ruby/1.8/wsdl \
264 \
265 $(1)/usr/lib/ruby/1.8/xmlrpc \
266 \
267 $(1)/usr/lib/ruby/1.8/xsd \
268 \
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 \
272
273 find $(1) -name '*.h' | xargs rm -f
274 endef
275
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/
281 endef
282
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/
288 endef
289
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 - )
294 endef
295
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/
302 endef
303
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 - )
308 endef
309
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 - )
315 endef
316
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 - )
336 endef
337
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/
344 endef
345
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 - )
352 endef
353
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/
357 endef
358
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/
363 endef
364
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/
368 endef
369
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/
377 endef
378
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/
383 endef
384
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/
388 endef
389
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/
393 endef
394
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/
398 endef
399
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 - )
406 endef
407
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 - )
412 endef
413
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))
436
437 $(eval $(call RequireCommand,ruby, \
438 $(PKG_NAME) requires ruby installed on the host-system. \
439 ))
440