You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1374 lines
37 KiB

  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # To Do:
  8. # - dirs not removed when uninstalling!
  9. #
  10. include $(TOPDIR)/rules.mk
  11. PKG_NAME:=ruby
  12. PKG_VERSION:=2.2.0
  13. PKG_RELEASE:=1
  14. PKG_LIBVER:=2.2
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
  17. PKG_MD5SUM:=d03cd4690fec1fff81d096d1c1255fde
  18. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  19. PKG_LICENSE:=BSD-2-Clause
  20. PKG_LICENSE_FILES:=COPYING
  21. PKG_BUILD_DEPENDS:=ruby/host
  22. PKG_INSTALL:=1
  23. PKG_BUILD_PARALLEL:=1
  24. PKG_FIXUP:=autoreconf
  25. include $(INCLUDE_DIR)/host-build.mk
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/nls.mk
  28. define Package/ruby/Default
  29. SUBMENU:=Ruby
  30. SECTION:=lang
  31. CATEGORY:=Languages
  32. TITLE:=Ruby scripting language
  33. URL:=http://www.ruby-lang.org/
  34. endef
  35. define Package/ruby/Default/description
  36. Ruby is the interpreted scripting language for quick and easy
  37. object-oriented programming. It has many features to process text files
  38. and to do system management tasks (as in perl). It is simple,
  39. straight-forward, and extensible.
  40. endef
  41. define Package/ruby
  42. $(call Package/ruby/Default)
  43. TITLE+= (interpreter)
  44. DEPENDS:=+libruby
  45. endef
  46. define Package/ruby/description
  47. $(call Package/ruby/Default/description)
  48. endef
  49. define Package/libruby
  50. $(call Package/ruby/Default)
  51. SUBMENU:=
  52. SECTION:=libs
  53. CATEGORY:=Libraries
  54. TITLE+= (shared library)
  55. DEPENDS+= +libpthread +librt +libgmp
  56. endef
  57. define Package/ruby-stdlib
  58. $(call Package/ruby/Default)
  59. TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
  60. DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
  61. +ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
  62. +ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
  63. +ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
  64. +ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
  65. +ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
  66. +ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
  67. +ruby-yaml +ruby-zlib
  68. endef
  69. define Package/ruby-stdlib/description
  70. This metapackage currently install all ruby-* packages,
  71. providing a complete Ruby Standard Library.
  72. endef
  73. define Package/ruby-bigdecimal
  74. $(call Package/ruby/Default)
  75. TITLE:=Arbitrary-precision decimal floating-point lib for Ruby
  76. DEPENDS:=ruby
  77. endef
  78. define Package/ruby-bigdecimal/description
  79. Provides bigdecimal* files
  80. endef
  81. define Package/ruby-cgi
  82. $(call Package/ruby/Default)
  83. TITLE:=Ruby CGI support toolkit
  84. DEPENDS:=ruby +ruby-filelib +ruby-pstore
  85. endef
  86. define Package/ruby-bigdecimal/description
  87. Provides bigdecimal* files
  88. endef
  89. define Package/ruby-csv
  90. $(call Package/ruby/Default)
  91. TITLE+=CSV library
  92. DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc
  93. endef
  94. define Package/ruby-csv/description
  95. Provides csv.rb file
  96. endef
  97. define Package/ruby-datetime
  98. $(call Package/ruby/Default)
  99. TITLE+= date library
  100. DEPENDS:=ruby
  101. endef
  102. define Package/ruby-datetime/description
  103. Provides date.rb and time.rb
  104. endef
  105. define Package/ruby-dbm
  106. $(call Package/ruby/Default)
  107. TITLE:=Ruby support for dbm
  108. DEPENDS:=ruby +libdb47
  109. endef
  110. define Package/ruby-dbm/description
  111. The DBM class provides a wrapper to a Unix-style dbm or Database Manager library.
  112. This package provides dbm.so file.
  113. endef
  114. define Package/ruby-debuglib
  115. $(call Package/ruby/Default)
  116. TITLE+= debug library
  117. DEPENDS:=ruby +ruby-multithread +ruby-prettyprint
  118. endef
  119. define Package/ruby-debuglib/description
  120. Provides files for debugging:
  121. - benchmark.rb
  122. - debug.rb
  123. - objspace.so
  124. - profile.rb
  125. - profiler.rb
  126. - tracer.rb
  127. endef
  128. define Package/ruby-digest
  129. $(call Package/ruby/Default)
  130. TITLE:=Ruby Digest Library
  131. DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl
  132. endef
  133. define Package/ruby-digest/description
  134. Provides digest* files. Can be configured to use OpenSSL or
  135. bundled hash functions.
  136. endef
  137. define Package/ruby-digest/config
  138. config RUBY_DIGEST_USE_OPENSSL
  139. bool "Use OpenSSL functions for ruby digest hash functions"
  140. depends on PACKAGE_ruby-digest
  141. help
  142. Ruby can use OpenSSL hash functions or compile alternative implementations. Using
  143. OpenSSL saves about 30KBytes (less when compressed) but requires OpenSSL (that
  144. is way bigger than that). However, if OpenSSL is already needed by another usage,
  145. as ruby-openssl or any other non ruby package, it is better to mark this option.
  146. default n
  147. endef
  148. define Package/ruby-drb
  149. $(call Package/ruby/Default)
  150. TITLE:=Ruby distributed object system
  151. DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket
  152. endef
  153. define Package/ruby-drb/description
  154. Provides drb* files
  155. endef
  156. define Package/ruby-enc
  157. $(call Package/ruby/Default)
  158. TITLE:=Ruby character re-coding library charset (small subset)
  159. DEPENDS:=ruby
  160. endef
  161. define Package/ruby-enc/description
  162. Provides ruby encoding library for encodings used directly by
  163. libraries in Ruby Standard Library:
  164. - enc/encdb.so
  165. - enc/euc_jp.so
  166. - enc/iso_8859_1.so
  167. - enc/utf_16be.so
  168. - enc/utf_16le.so
  169. - enc/utf_32be.so
  170. - enc/utf_32le.so
  171. FYI: ASCII-8BIT, UTF-7, UTF-8 and US-ASCII are already in Core.
  172. endef
  173. define Package/ruby-enc-extra
  174. $(call Package/ruby/Default)
  175. TITLE:=Ruby character re-coding library charset (extra subset)
  176. DEPENDS:=ruby +ruby-enc
  177. endef
  178. define Package/ruby-enc-extra/description
  179. Provides extra encodings not provided by ruby-enc:
  180. - enc/big5.so
  181. - enc/cp949.so
  182. - enc/emacs_mule.so
  183. - enc/euc_kr.so
  184. - enc/euc_tw.so
  185. - enc/gb18030.so
  186. - enc/gb2312.so
  187. - enc/gbk.so
  188. - enc/iso_8859_10.so
  189. - enc/iso_8859_11.so
  190. - enc/iso_8859_13.so
  191. - enc/iso_8859_14.so
  192. - enc/iso_8859_15.so
  193. - enc/iso_8859_16.so
  194. - enc/iso_8859_2.so
  195. - enc/iso_8859_3.so
  196. - enc/iso_8859_4.so
  197. - enc/iso_8859_5.so
  198. - enc/iso_8859_6.so
  199. - enc/iso_8859_7.so
  200. - enc/iso_8859_8.so
  201. - enc/iso_8859_9.so
  202. - enc/koi8_r.so
  203. - enc/koi8_u.so
  204. - enc/shift_jis.so
  205. - enc/trans/big5.so
  206. - enc/trans/chinese.so
  207. - enc/trans/emoji.so
  208. - enc/trans/emoji_iso2022_kddi.so
  209. - enc/trans/emoji_sjis_docomo.so
  210. - enc/trans/emoji_sjis_kddi.so
  211. - enc/trans/emoji_sjis_softbank.so
  212. - enc/trans/escape.so
  213. - enc/trans/gb18030.so
  214. - enc/trans/gbk.so
  215. - enc/trans/iso2022.so
  216. - enc/trans/japanese.so
  217. - enc/trans/japanese_euc.so
  218. - enc/trans/japanese_sjis.so
  219. - enc/trans/korean.so
  220. - enc/trans/single_byte.so
  221. - enc/trans/transdb.so
  222. - enc/trans/utf8_mac.so
  223. - enc/trans/utf_16_32.so
  224. - enc/windows_1251.so
  225. - enc/windows_31j.so
  226. endef
  227. define Package/ruby-erb
  228. $(call Package/ruby/Default)
  229. TITLE+= (embedded interpreter)
  230. DEPENDS:=ruby +ruby-cgi
  231. endef
  232. define Package/ruby-erb/description
  233. Provides erb* files
  234. endef
  235. define Package/ruby-fiddle
  236. $(call Package/ruby/Default)
  237. TITLE:=A libffi wrapper for Ruby
  238. DEPENDS:=ruby +libffi
  239. endef
  240. define Package/ruby-fiddle/description
  241. Provides fiddle* files
  242. endef
  243. define Package/ruby-filelib
  244. $(call Package/ruby/Default)
  245. TITLE+= File utils library
  246. DEPENDS:=ruby +ruby-enc +ruby-misc
  247. endef
  248. define Package/ruby-filelib/description
  249. Provides filesystem interaction files, including
  250. path and temp:
  251. - fileutils.rb
  252. - find.rb
  253. - pathname.rb
  254. - pathname.so
  255. - tempfile.rb
  256. - tmpdir.rb
  257. endef
  258. define Package/ruby-gdbm
  259. $(call Package/ruby/Default)
  260. TITLE:=Ruby support for gdbm
  261. DEPENDS:=ruby +libgdbm
  262. endef
  263. define Package/ruby-gdbm/description
  264. Provides gdbm* files
  265. endef
  266. define Package/ruby-gems
  267. $(call Package/ruby/Default)
  268. TITLE:=Ruby gems packet management
  269. DEPENDS:=ruby +ruby-net +ruby-rdoc
  270. endef
  271. define Package/ruby-gems/description
  272. Provides rubygems for gems usage, download and installation
  273. endef
  274. define Package/ruby-io-console
  275. $(call Package/ruby/Default)
  276. TITLE+= Console interface
  277. DEPENDS:=ruby
  278. endef
  279. define Package/ruby-io-console/description
  280. Provides io-console* files
  281. endef
  282. define Package/ruby-irb
  283. $(call Package/ruby/Default)
  284. TITLE+= (interactive shell)
  285. DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math
  286. endef
  287. define Package/ruby-irb/description
  288. Provides irb* files
  289. endef
  290. define Package/ruby-json
  291. $(call Package/ruby/Default)
  292. TITLE:=Ruby support for JSON
  293. DEPENDS:=ruby +ruby-datetime +ruby-misc
  294. endef
  295. define Package/ruby-json/description
  296. Provides json* files
  297. endef
  298. define Package/ruby-logger
  299. $(call Package/ruby/Default)
  300. TITLE+= logger and syslog library
  301. DEPENDS:=ruby +ruby-multithread
  302. endef
  303. define Package/ruby-logger/description
  304. Provides log library, including syslog:
  305. - logger.rb
  306. - syslog.so
  307. - syslog/logger.rb
  308. endef
  309. define Package/ruby-math
  310. $(call Package/ruby/Default)
  311. TITLE+= math library
  312. DEPENDS:=ruby +ruby-patterns
  313. endef
  314. define Package/ruby-math/description
  315. Provides math related files:
  316. - cmath.rb
  317. - complex.rb
  318. - mathn.rb
  319. - mathn/complex.so
  320. - mathn/rational.so
  321. - matrix.rb
  322. - matrix/eigenvalue_decomposition.rb
  323. - matrix/lup_decomposition.rb
  324. - prime.rb
  325. - rational.rb
  326. endef
  327. define Package/ruby-minitest
  328. $(call Package/ruby/Default)
  329. TITLE:=Gem minitest shipped with Ruby
  330. DEPENDS:=ruby +ruby-gems
  331. endef
  332. define Package/ruby-minitest/description
  333. Provides minitest gem
  334. endef
  335. define Package/ruby-misc
  336. $(call Package/ruby/Default)
  337. TITLE:=Ruby standard libraries subset (miscelaneous files)
  338. DEPENDS:=ruby
  339. endef
  340. define Package/ruby-misc/description
  341. This package contains miscellaneous files from stdlib
  342. not splitted in other ruby packages like stringio:
  343. - English.rb
  344. - abbrev.rb
  345. - base64.rb
  346. - continuation.so
  347. - coverage.so
  348. - delegate.rb
  349. - e2mmap.rb
  350. - etc.so
  351. - expect.rb
  352. - fcntl.so
  353. - fiber.so
  354. - getoptlong.rb
  355. - open3.rb
  356. - ostruct.rb
  357. - pty.so
  358. - scanf.rb
  359. - securerandom.rb
  360. - set.rb
  361. - shellwords.rb
  362. - stringio.so
  363. - strscan.so
  364. - tsort.rb
  365. - weakref.rb
  366. endef
  367. define Package/ruby-mkmf
  368. $(call Package/ruby/Default)
  369. TITLE+= makefile library
  370. DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig
  371. endef
  372. define Package/ruby-mkmf/description
  373. Provides mkmf* files
  374. endef
  375. define Package/ruby-multithread
  376. $(call Package/ruby/Default)
  377. TITLE+= multithread library
  378. DEPENDS:=ruby +ruby-misc
  379. endef
  380. define Package/ruby-multithread/description
  381. Provides files for multithread usage:
  382. - io/nonblock.so
  383. - io/wait.so
  384. - thread.so (FYI, Thread is a core class)
  385. - monitor.rb
  386. - mutex_m.rb
  387. - sync.rb
  388. - thwait.rb
  389. - timeout.rb
  390. endef
  391. define Package/ruby-net
  392. $(call Package/ruby/Default)
  393. TITLE:=Ruby Network Protocols Library
  394. DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri
  395. endef
  396. define Package/ruby-net/description
  397. Provides net* files
  398. endef
  399. define Package/ruby-nkf
  400. $(call Package/ruby/Default)
  401. TITLE:=Ruby Network Kanji Filter
  402. DEPENDS:=ruby +ruby-enc
  403. endef
  404. define Package/ruby-nkf/description
  405. Provides nkf* files
  406. endef
  407. define Package/ruby-openssl
  408. $(call Package/ruby/Default)
  409. TITLE:=Ruby support for openssl
  410. DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc
  411. endef
  412. define Package/ruby-openssl/description
  413. Provides openssl* files
  414. endef
  415. define Package/ruby-optparse
  416. $(call Package/ruby/Default)
  417. TITLE:=Ruby command-line option analysis
  418. DEPENDS:=ruby +ruby-misc
  419. endef
  420. define Package/ruby-optparse/description
  421. Provides optparse* files
  422. endef
  423. define Package/ruby-patterns
  424. $(call Package/ruby/Default)
  425. TITLE:=Ruby design patterns implementation
  426. DEPENDS:=ruby +ruby-multithread
  427. endef
  428. define Package/ruby-patterns/description
  429. Provides design patterns helpers files:
  430. - forwardable.rb
  431. - observer.rb
  432. - singleton.rb
  433. endef
  434. define Package/ruby-powerassert
  435. $(call Package/ruby/Default)
  436. TITLE:=Gem power_assert shipped with Ruby
  437. DEPENDS:=ruby +ruby-ripper
  438. endef
  439. define Package/ruby-powerassert/description
  440. Power Assert gem for Ruby. Power Assert shows each value of variables
  441. and method calls in the expression. It is useful for testing, providing
  442. which value wasn't correct when the condition is not satisfied
  443. endef
  444. define Package/ruby-prettyprint
  445. $(call Package/ruby/Default)
  446. TITLE:=Ruby PrettyPrint librart
  447. DEPENDS:=ruby +ruby-misc
  448. endef
  449. define Package/ruby-prettyprint/description
  450. Provides Pretty Print library:
  451. - pp.rb
  452. - prettyprint.rb
  453. endef
  454. define Package/ruby-pstore
  455. $(call Package/ruby/Default)
  456. TITLE+=file based persistence
  457. DEPENDS:=ruby +ruby-digest +ruby-enc
  458. endef
  459. define Package/ruby-pstore/description
  460. Provides pstore.rb file
  461. endef
  462. define Package/ruby-psych
  463. $(call Package/ruby/Default)
  464. TITLE+=YAML parser and emitter
  465. DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc
  466. endef
  467. define Package/ruby-psych/description
  468. Provides psych* files
  469. endef
  470. define Package/ruby-racc
  471. $(call Package/ruby/Default)
  472. TITLE:=LALR parser generator in Ruby
  473. DEPENDS:=ruby
  474. endef
  475. define Package/ruby-racc/description
  476. Provides racc* files
  477. endef
  478. define Package/ruby-rake
  479. $(call Package/ruby/Default)
  480. TITLE+=Ruby Rake (make replacement)
  481. DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig
  482. endef
  483. define Package/ruby-rake/description
  484. Provides rake* files
  485. endef
  486. define Package/ruby-rbconfig
  487. $(call Package/ruby/Default)
  488. TITLE+=Ruby RbConfig
  489. DEPENDS:=ruby
  490. endef
  491. define Package/ruby-rbconfig/description
  492. Provides rbconfig file
  493. endef
  494. define Package/ruby-rdoc
  495. $(call Package/ruby/Default)
  496. TITLE+= (documentation generator)
  497. DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
  498. endef
  499. define Package/ruby-rdoc/description
  500. Provides rdoc* and ri files
  501. endef
  502. define Package/ruby-readline
  503. $(call Package/ruby/Default)
  504. TITLE:=Ruby support for readline
  505. DEPENDS:=ruby +libncurses +libreadline
  506. endef
  507. define Package/ruby-readline/description
  508. Provides readline* files
  509. endef
  510. define Package/ruby-rexml
  511. $(call Package/ruby/Default)
  512. TITLE:=Ruby XML toolkit
  513. DEPENDS:=ruby +ruby-patterns +ruby-enc
  514. endef
  515. define Package/ruby-rexml/description
  516. Provides rexml* files
  517. endef
  518. define Package/ruby-rinda
  519. $(call Package/ruby/Default)
  520. TITLE:=Ruby Linda paradigm implementation
  521. DEPENDS:=ruby +ruby-drb
  522. endef
  523. define Package/ruby-rinda/description
  524. Provides rinda* files
  525. endef
  526. define Package/ruby-ripper
  527. $(call Package/ruby/Default)
  528. TITLE:=Ruby script parser
  529. DEPENDS:=ruby
  530. endef
  531. define Package/ruby-ripper/description
  532. Provides ripper* files
  533. endef
  534. define Package/ruby-rss
  535. $(call Package/ruby/Default)
  536. TITLE:=Ruby RSS toolkit
  537. DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml
  538. endef
  539. define Package/ruby-rss/description
  540. Provides rss* files
  541. endef
  542. define Package/ruby-sdbm
  543. $(call Package/ruby/Default)
  544. TITLE:=Ruby simple file-based key-value dbm implementation
  545. DEPENDS:=ruby
  546. endef
  547. define Package/ruby-sdbm/description
  548. Provides sdbm* files
  549. endef
  550. define Package/ruby-shell
  551. $(call Package/ruby/Default)
  552. TITLE:=Ruby idiomatic Ruby interface
  553. DEPENDS:=ruby +ruby-patterns
  554. endef
  555. define Package/ruby-shell/description
  556. Provides shell* files
  557. endef
  558. define Package/ruby-socket
  559. $(call Package/ruby/Default)
  560. TITLE+= socket support
  561. DEPENDS:=ruby +ruby-multithread
  562. endef
  563. define Package/ruby-socket/description
  564. Provides socket-related files:
  565. - gserver.rb
  566. - ipaddr.rb
  567. - resolv-replace.rb
  568. - resolv.rb
  569. - socket.rb
  570. - socket.so
  571. endef
  572. define Package/ruby-testunit
  573. $(call Package/ruby/Default)
  574. TITLE:=Gem test-unit shipped with Ruby
  575. DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
  576. endef
  577. define Package/ruby-testunit/description
  578. Provides test/unit* files
  579. endef
  580. define Package/ruby-unicodenormalize
  581. $(call Package/ruby/Default)
  582. TITLE:=Ruby String additions for Unicode normalization
  583. DEPENDS:=ruby +ruby-enc +ruby-enc-extra
  584. endef
  585. define Package/ruby-unicodenormalize/description
  586. Additions to class String for Unicode normalization
  587. endef
  588. define Package/ruby-uri
  589. $(call Package/ruby/Default)
  590. TITLE:=Ruby library to handle URI
  591. DEPENDS:=ruby +ruby-socket +ruby-enc
  592. endef
  593. define Package/ruby-uri/description
  594. Provides uri* files
  595. endef
  596. define Package/ruby-webrick
  597. $(call Package/ruby/Default)
  598. TITLE:=Ruby Web server toolkit
  599. DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig
  600. endef
  601. define Package/ruby-webrick/description
  602. Provides webrick* files
  603. endef
  604. define Package/ruby-xmlrpc
  605. $(call Package/ruby/Default)
  606. TITLE:=Ruby XML-RPC toolkit
  607. DEPENDS:=ruby +ruby-rexml +ruby-webrick
  608. endef
  609. define Package/ruby-xmlrpc/description
  610. Provides xmlrpc* files
  611. endef
  612. define Package/ruby-yaml
  613. $(call Package/ruby/Default)
  614. TITLE:=Ruby YAML toolkit
  615. DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych
  616. endef
  617. define Package/ruby-yaml/description
  618. Provides yaml* files
  619. endef
  620. define Package/ruby-zlib
  621. $(call Package/ruby/Default)
  622. TITLE:=Ruby support for zlib
  623. DEPENDS:=ruby +zlib
  624. endef
  625. define Package/ruby-zlib/description
  626. Provides zlib* files
  627. endef
  628. HOST_CONFIGURE_ARGS += \
  629. --disable-install-doc \
  630. --disable-install-rdoc \
  631. --disable-install-capi \
  632. --with-static-linked-ext \
  633. CONFIGURE_ARGS += \
  634. --enable-shared \
  635. --enable-static \
  636. --disable-rpath \
  637. --enable-ipv6 \
  638. --disable-install-doc \
  639. --disable-install-capi \
  640. --with-ruby-version=minor \
  641. --with-iconv-dir=$(ICONV_PREFIX) \
  642. ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
  643. CONFIGURE_ARGS += \
  644. --with-bundled-sha1\
  645. --with-bundled-md5\
  646. --with-bundled-rmd160\
  647. --with-bundled-sha2 \
  648. endif
  649. TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
  650. MAKE_FLAGS += \
  651. DESTDIR="$(PKG_INSTALL_DIR)" \
  652. SHELL="/bin/bash"
  653. define Package/ruby/install
  654. $(INSTALL_DIR) $(1)/usr/bin
  655. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  656. $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
  657. $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
  658. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
  659. $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
  660. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
  661. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
  662. sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
  663. sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
  664. endef
  665. define Package/libruby/install
  666. $(INSTALL_DIR) $(1)/usr/lib
  667. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
  668. endef
  669. define Package/ruby-stdlib/install
  670. # nothing to do
  671. endef
  672. define Package/ruby-bigdecimal/install
  673. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  674. usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \
  675. usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \
  676. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \
  677. ) | ( cd $(1); $(TAR) -xf - )
  678. endef
  679. define Package/ruby-cgi/install
  680. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  681. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  682. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  683. endef
  684. define Package/ruby-csv/install
  685. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  686. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  687. endef
  688. define Package/ruby-datetime/install
  689. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  690. usr/lib/ruby/$(PKG_LIBVER)/time.rb \
  691. usr/lib/ruby/$(PKG_LIBVER)/date.rb \
  692. usr/lib/ruby/$(PKG_LIBVER)/date/ \
  693. usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \
  694. ) | ( cd $(1); $(TAR) -xf - )
  695. endef
  696. define Package/ruby-dbm/install
  697. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  698. usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \
  699. ) | ( cd $(1); $(TAR) -xf - )
  700. endef
  701. define Package/ruby-debuglib/install
  702. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  703. usr/lib/ruby/$(PKG_LIBVER)/profile.rb \
  704. usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \
  705. usr/lib/ruby/$(PKG_LIBVER)/debug.rb \
  706. usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \
  707. usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \
  708. usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \
  709. ) | ( cd $(1); $(TAR) -xf - )
  710. endef
  711. define Package/ruby-digest/install
  712. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  713. usr/lib/ruby/$(PKG_LIBVER)/digest \
  714. usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
  715. usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
  716. usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \
  717. ) | ( cd $(1); $(TAR) -xf - )
  718. endef
  719. define Package/ruby-drb/install
  720. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  721. usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
  722. usr/lib/ruby/$(PKG_LIBVER)/drb \
  723. ) | ( cd $(1); $(TAR) -xf - )
  724. endef
  725. define Package/ruby-enc/install
  726. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  727. usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  728. usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  729. usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  730. usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  731. ) | ( cd $(1); $(TAR) -xf - )
  732. endef
  733. define Package/ruby-enc-extra/install
  734. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  735. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  736. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  737. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  738. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  739. -cf - \
  740. usr/lib/ruby/$(PKG_LIBVER)/*/enc \
  741. ) | ( cd $(1); $(TAR) -xf - )
  742. endef
  743. define Package/ruby-erb/install
  744. $(INSTALL_DIR) $(1)/usr/bin
  745. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
  746. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  747. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  748. endef
  749. define Package/ruby-fiddle/install
  750. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  751. usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \
  752. usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \
  753. usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \
  754. ) | ( cd $(1); $(TAR) -xf - )
  755. endef
  756. define Package/ruby-filelib/install
  757. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  758. usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \
  759. usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \
  760. usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \
  761. usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \
  762. usr/lib/ruby/$(PKG_LIBVER)/find.rb \
  763. usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \
  764. ) | ( cd $(1); $(TAR) -xf - )
  765. endef
  766. define Package/ruby-gdbm/install
  767. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  768. usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
  769. ) | ( cd $(1); $(TAR) -xf - )
  770. endef
  771. define Package/ruby-gems/install
  772. $(INSTALL_DIR) $(1)/usr/bin
  773. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
  774. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  775. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  776. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  777. # Remove tests (avoids extra deps)
  778. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
  779. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
  780. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
  781. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  782. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  783. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  784. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
  785. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
  786. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
  787. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
  788. endef
  789. define Package/ruby-io-console/install
  790. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  791. usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \
  792. usr/lib/ruby/$(PKG_LIBVER)/io/console/ \
  793. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \
  794. ) | ( cd $(1); $(TAR) -xf - )
  795. endef
  796. define Package/ruby-irb/install
  797. $(INSTALL_DIR) $(1)/usr/bin
  798. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
  799. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  800. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  801. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  802. endef
  803. define Package/ruby-json/install
  804. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  805. usr/lib/ruby/$(PKG_LIBVER)/json.rb \
  806. usr/lib/ruby/$(PKG_LIBVER)/json \
  807. usr/lib/ruby/$(PKG_LIBVER)/*/json \
  808. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \
  809. ) | ( cd $(1); $(TAR) -xf - )
  810. rm -rf \
  811. $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json
  812. endef
  813. define Package/ruby-logger/install
  814. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  815. usr/lib/ruby/$(PKG_LIBVER)/logger.rb \
  816. usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \
  817. usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \
  818. ) | ( cd $(1); $(TAR) -xf - )
  819. endef
  820. define Package/ruby-math/install
  821. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  822. usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
  823. usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
  824. usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
  825. usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
  826. usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
  827. usr/lib/ruby/$(PKG_LIBVER)/matrix \
  828. ) | ( cd $(1); $(TAR) -xf - )
  829. endef
  830. define Package/ruby-minitest/install
  831. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  832. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  833. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  834. # Remove tests (avoids extra deps)
  835. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
  836. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  837. endef
  838. define Package/ruby-misc/install
  839. $(INSTALL_DIR) $(1)/usr/lib
  840. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  841. usr/lib/ruby/$(PKG_LIBVER)/English.rb \
  842. usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \
  843. usr/lib/ruby/$(PKG_LIBVER)/base64.rb \
  844. usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \
  845. usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \
  846. usr/lib/ruby/$(PKG_LIBVER)/expect.rb \
  847. usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \
  848. usr/lib/ruby/$(PKG_LIBVER)/open3.rb \
  849. usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \
  850. usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \
  851. usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \
  852. usr/lib/ruby/$(PKG_LIBVER)/set.rb \
  853. usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \
  854. usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \
  855. usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \
  856. usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \
  857. usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \
  858. usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \
  859. usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \
  860. usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \
  861. usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \
  862. usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \
  863. usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \
  864. ) | ( cd $(1); $(TAR) -xf - )
  865. endef
  866. define Package/ruby-mkmf/install
  867. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  868. usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \
  869. usr/lib/ruby/$(PKG_LIBVER)/un.rb \
  870. ) | ( cd $(1); $(TAR) -xf - )
  871. endef
  872. define Package/ruby-multithread/install
  873. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  874. usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \
  875. usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \
  876. usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \
  877. usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \
  878. usr/lib/ruby/$(PKG_LIBVER)/sync.rb \
  879. usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \
  880. usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \
  881. usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \
  882. ) | ( cd $(1); $(TAR) -xf - )
  883. endef
  884. define Package/ruby-net/install
  885. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  886. usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \
  887. usr/lib/ruby/$(PKG_LIBVER)/net/* \
  888. ) | ( cd $(1); $(TAR) -xf - )
  889. endef
  890. define Package/ruby-nkf/install
  891. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  892. usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
  893. usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
  894. ) | ( cd $(1); $(TAR) -xf - )
  895. endef
  896. define Package/ruby-openssl/install
  897. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  898. usr/lib/ruby/$(PKG_LIBVER)/openssl \
  899. usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
  900. usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
  901. ) | ( cd $(1); $(TAR) -xf - )
  902. endef
  903. define Package/ruby-optparse/install
  904. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  905. usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
  906. usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
  907. usr/lib/ruby/$(PKG_LIBVER)/optparse \
  908. ) | ( cd $(1); $(TAR) -xf - )
  909. endef
  910. define Package/ruby-patterns/install
  911. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  912. usr/lib/ruby/$(PKG_LIBVER)/observer.rb \
  913. usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \
  914. usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \
  915. ) | ( cd $(1); $(TAR) -xf - )
  916. endef
  917. define Package/ruby-powerassert/install
  918. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  919. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  920. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  921. # Remove tests (avoids extra deps)
  922. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
  923. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  924. endef
  925. define Package/ruby-prettyprint/install
  926. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  927. usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
  928. usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \
  929. ) | ( cd $(1); $(TAR) -xf - )
  930. endef
  931. define Package/ruby-pstore/install
  932. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  933. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  934. endef
  935. define Package/ruby-psych/install
  936. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  937. usr/lib/ruby/$(PKG_LIBVER)/psych \
  938. usr/lib/ruby/$(PKG_LIBVER)/psych.rb \
  939. usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \
  940. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \
  941. ) | ( cd $(1); $(TAR) -xf - )
  942. endef
  943. define Package/ruby-racc/install
  944. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  945. usr/lib/ruby/$(PKG_LIBVER)/racc \
  946. usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \
  947. ) | ( cd $(1); $(TAR) -xf - )
  948. endef
  949. define Package/ruby-rake/install
  950. $(INSTALL_DIR) $(1)/usr/bin
  951. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
  952. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  953. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  954. # Remove tests (avoids extra deps)
  955. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
  956. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  957. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  958. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  959. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \
  960. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  961. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  962. endef
  963. define Package/ruby-rbconfig/install
  964. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  965. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \
  966. usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \
  967. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \
  968. ) | ( cd $(1); $(TAR) -xf - )
  969. endef
  970. define Package/ruby-rdoc/install
  971. $(INSTALL_DIR) $(1)/usr/bin
  972. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
  973. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
  974. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  975. # Remove tests (avoids extra deps)
  976. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
  977. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
  978. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
  979. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  980. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  981. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  982. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  983. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \
  984. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  985. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \
  986. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  987. endef
  988. define Package/ruby-readline/install
  989. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  990. usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
  991. ) | ( cd $(1); $(TAR) -xf - )
  992. endef
  993. define Package/ruby-rexml/install
  994. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  995. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  996. endef
  997. define Package/ruby-rinda/install
  998. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  999. usr/lib/ruby/$(PKG_LIBVER)/rinda \
  1000. ) | ( cd $(1); $(TAR) -xf - )
  1001. endef
  1002. define Package/ruby-ripper/install
  1003. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1004. usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \
  1005. usr/lib/ruby/$(PKG_LIBVER)/ripper \
  1006. usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \
  1007. ) | ( cd $(1); $(TAR) -xf - )
  1008. endef
  1009. define Package/ruby-rss/install
  1010. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1011. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1012. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1013. endef
  1014. define Package/ruby-sdbm/install
  1015. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1016. usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \
  1017. ) | ( cd $(1); $(TAR) -xf - )
  1018. endef
  1019. define Package/ruby-shell/install
  1020. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1021. usr/lib/ruby/$(PKG_LIBVER)/shell.rb \
  1022. usr/lib/ruby/$(PKG_LIBVER)/shell \
  1023. ) | ( cd $(1); $(TAR) -xf - )
  1024. endef
  1025. define Package/ruby-socket/install
  1026. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1027. usr/lib/ruby/$(PKG_LIBVER)/gserver.rb \
  1028. usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \
  1029. usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \
  1030. usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \
  1031. usr/lib/ruby/$(PKG_LIBVER)/socket.rb \
  1032. usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \
  1033. ) | ( cd $(1); $(TAR) -xf - )
  1034. endef
  1035. define Package/ruby-testunit/install
  1036. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  1037. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  1038. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  1039. # Remove tests (avoids extra deps)
  1040. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
  1041. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
  1042. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  1043. endef
  1044. define Package/ruby-unicodenormalize/install
  1045. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1046. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
  1047. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
  1048. ) | ( cd $(1); $(TAR) -xf - )
  1049. endef
  1050. define Package/ruby-uri/install
  1051. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1052. usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
  1053. usr/lib/ruby/$(PKG_LIBVER)/uri \
  1054. ) | ( cd $(1); $(TAR) -xf - )
  1055. endef
  1056. define Package/ruby-webrick/install
  1057. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1058. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1059. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1060. endef
  1061. define Package/ruby-xmlrpc/install
  1062. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1063. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1064. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1065. endef
  1066. define Package/ruby-yaml/install
  1067. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1068. usr/lib/ruby/$(PKG_LIBVER)/yaml \
  1069. usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
  1070. ) | ( cd $(1); $(TAR) -xf - )
  1071. endef
  1072. define Package/ruby-zlib/install
  1073. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1074. usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
  1075. ) | ( cd $(1); $(TAR) -xf - )
  1076. endef
  1077. define Build/InstallDev
  1078. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1079. . \
  1080. ) | ( cd $(1); $(TAR) -xf - )
  1081. endef
  1082. $(eval $(call BuildPackage,ruby))
  1083. $(eval $(call BuildPackage,libruby))
  1084. $(eval $(call BuildPackage,ruby-stdlib))
  1085. $(eval $(call BuildPackage,ruby-bigdecimal))
  1086. $(eval $(call BuildPackage,ruby-cgi))
  1087. $(eval $(call BuildPackage,ruby-csv))
  1088. $(eval $(call BuildPackage,ruby-datetime))
  1089. $(eval $(call BuildPackage,ruby-dbm))
  1090. $(eval $(call BuildPackage,ruby-debuglib))
  1091. $(eval $(call BuildPackage,ruby-digest))
  1092. $(eval $(call BuildPackage,ruby-drb))
  1093. $(eval $(call BuildPackage,ruby-enc))
  1094. $(eval $(call BuildPackage,ruby-enc-extra))
  1095. $(eval $(call BuildPackage,ruby-erb))
  1096. $(eval $(call BuildPackage,ruby-fiddle))
  1097. $(eval $(call BuildPackage,ruby-filelib))
  1098. $(eval $(call BuildPackage,ruby-gdbm))
  1099. $(eval $(call BuildPackage,ruby-gems))
  1100. $(eval $(call BuildPackage,ruby-io-console))
  1101. $(eval $(call BuildPackage,ruby-irb))
  1102. $(eval $(call BuildPackage,ruby-json))
  1103. $(eval $(call BuildPackage,ruby-logger))
  1104. $(eval $(call BuildPackage,ruby-math))
  1105. $(eval $(call BuildPackage,ruby-minitest))
  1106. $(eval $(call BuildPackage,ruby-misc))
  1107. $(eval $(call BuildPackage,ruby-mkmf))
  1108. $(eval $(call BuildPackage,ruby-multithread))
  1109. $(eval $(call BuildPackage,ruby-net))
  1110. $(eval $(call BuildPackage,ruby-nkf))
  1111. $(eval $(call BuildPackage,ruby-openssl))
  1112. $(eval $(call BuildPackage,ruby-optparse))
  1113. $(eval $(call BuildPackage,ruby-patterns))
  1114. $(eval $(call BuildPackage,ruby-powerassert))
  1115. $(eval $(call BuildPackage,ruby-prettyprint))
  1116. $(eval $(call BuildPackage,ruby-pstore))
  1117. $(eval $(call BuildPackage,ruby-psych))
  1118. $(eval $(call BuildPackage,ruby-racc))
  1119. $(eval $(call BuildPackage,ruby-rake))
  1120. $(eval $(call BuildPackage,ruby-rbconfig))
  1121. $(eval $(call BuildPackage,ruby-rdoc))
  1122. $(eval $(call BuildPackage,ruby-readline))
  1123. $(eval $(call BuildPackage,ruby-rexml))
  1124. $(eval $(call BuildPackage,ruby-rinda))
  1125. $(eval $(call BuildPackage,ruby-ripper))
  1126. $(eval $(call BuildPackage,ruby-rss))
  1127. $(eval $(call BuildPackage,ruby-sdbm))
  1128. $(eval $(call BuildPackage,ruby-shell))
  1129. $(eval $(call BuildPackage,ruby-socket))
  1130. $(eval $(call BuildPackage,ruby-testunit))
  1131. $(eval $(call BuildPackage,ruby-unicodenormalize))
  1132. $(eval $(call BuildPackage,ruby-uri))
  1133. $(eval $(call BuildPackage,ruby-webrick))
  1134. $(eval $(call BuildPackage,ruby-xmlrpc))
  1135. $(eval $(call BuildPackage,ruby-yaml))
  1136. $(eval $(call BuildPackage,ruby-zlib))
  1137. $(eval $(call HostBuild))