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.

1380 lines
37 KiB

  1. #
  2. # Copyright (C) 2006-2015 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.2
  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:=af6eb4fa7247f1f7b2e19c8e6f3e3145
  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. # even not used, host build with restricted exts results in gems not being
  634. # compiling for target (probably some cross compiling problem like checking
  635. # host for selecting target features)
  636. # --with-out-ext \
  637. # --with-ext=thread,stringio \
  638. CONFIGURE_ARGS += \
  639. --enable-shared \
  640. --enable-static \
  641. --disable-rpath \
  642. --enable-ipv6 \
  643. --disable-install-doc \
  644. --disable-install-capi \
  645. --with-ruby-version=minor \
  646. --with-iconv-dir=$(ICONV_PREFIX) \
  647. ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL
  648. CONFIGURE_ARGS += \
  649. --with-bundled-sha1\
  650. --with-bundled-md5\
  651. --with-bundled-rmd160\
  652. --with-bundled-sha2 \
  653. endif
  654. TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
  655. MAKE_FLAGS += \
  656. DESTDIR="$(PKG_INSTALL_DIR)" \
  657. SHELL="/bin/bash"
  658. define Package/ruby/install
  659. $(INSTALL_DIR) $(1)/usr/bin
  660. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  661. $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)
  662. $(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
  663. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
  664. $(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
  665. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
  666. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
  667. sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
  668. sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
  669. endef
  670. define Package/libruby/install
  671. $(INSTALL_DIR) $(1)/usr/lib
  672. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
  673. endef
  674. define Package/ruby-stdlib/install
  675. # nothing to do
  676. endef
  677. define Package/ruby-bigdecimal/install
  678. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  679. usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \
  680. usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \
  681. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \
  682. ) | ( cd $(1); $(TAR) -xf - )
  683. endef
  684. define Package/ruby-cgi/install
  685. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  686. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  687. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  688. endef
  689. define Package/ruby-csv/install
  690. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  691. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  692. endef
  693. define Package/ruby-datetime/install
  694. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  695. usr/lib/ruby/$(PKG_LIBVER)/time.rb \
  696. usr/lib/ruby/$(PKG_LIBVER)/date.rb \
  697. usr/lib/ruby/$(PKG_LIBVER)/date/ \
  698. usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \
  699. ) | ( cd $(1); $(TAR) -xf - )
  700. endef
  701. define Package/ruby-dbm/install
  702. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  703. usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \
  704. ) | ( cd $(1); $(TAR) -xf - )
  705. endef
  706. define Package/ruby-debuglib/install
  707. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  708. usr/lib/ruby/$(PKG_LIBVER)/profile.rb \
  709. usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \
  710. usr/lib/ruby/$(PKG_LIBVER)/debug.rb \
  711. usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \
  712. usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \
  713. usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \
  714. ) | ( cd $(1); $(TAR) -xf - )
  715. endef
  716. define Package/ruby-digest/install
  717. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  718. usr/lib/ruby/$(PKG_LIBVER)/digest \
  719. usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
  720. usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
  721. usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \
  722. ) | ( cd $(1); $(TAR) -xf - )
  723. endef
  724. define Package/ruby-drb/install
  725. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  726. usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
  727. usr/lib/ruby/$(PKG_LIBVER)/drb \
  728. ) | ( cd $(1); $(TAR) -xf - )
  729. endef
  730. define Package/ruby-enc/install
  731. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  732. usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  733. usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  734. usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  735. usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  736. ) | ( cd $(1); $(TAR) -xf - )
  737. endef
  738. define Package/ruby-enc-extra/install
  739. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  740. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \
  741. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \
  742. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \
  743. --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \
  744. -cf - \
  745. usr/lib/ruby/$(PKG_LIBVER)/*/enc \
  746. ) | ( cd $(1); $(TAR) -xf - )
  747. endef
  748. define Package/ruby-erb/install
  749. $(INSTALL_DIR) $(1)/usr/bin
  750. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
  751. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  752. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  753. endef
  754. define Package/ruby-fiddle/install
  755. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  756. usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \
  757. usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \
  758. usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \
  759. ) | ( cd $(1); $(TAR) -xf - )
  760. endef
  761. define Package/ruby-filelib/install
  762. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  763. usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \
  764. usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \
  765. usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \
  766. usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \
  767. usr/lib/ruby/$(PKG_LIBVER)/find.rb \
  768. usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \
  769. ) | ( cd $(1); $(TAR) -xf - )
  770. endef
  771. define Package/ruby-gdbm/install
  772. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  773. usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
  774. ) | ( cd $(1); $(TAR) -xf - )
  775. endef
  776. define Package/ruby-gems/install
  777. $(INSTALL_DIR) $(1)/usr/bin
  778. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
  779. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  780. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  781. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  782. # Remove tests (avoids extra deps)
  783. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
  784. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
  785. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
  786. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  787. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  788. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  789. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc
  790. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache
  791. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions
  792. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info
  793. endef
  794. define Package/ruby-io-console/install
  795. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  796. usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \
  797. usr/lib/ruby/$(PKG_LIBVER)/io/console/ \
  798. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \
  799. ) | ( cd $(1); $(TAR) -xf - )
  800. endef
  801. define Package/ruby-irb/install
  802. $(INSTALL_DIR) $(1)/usr/bin
  803. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
  804. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  805. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  806. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  807. endef
  808. define Package/ruby-json/install
  809. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  810. usr/lib/ruby/$(PKG_LIBVER)/json.rb \
  811. usr/lib/ruby/$(PKG_LIBVER)/json \
  812. usr/lib/ruby/$(PKG_LIBVER)/*/json \
  813. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \
  814. ) | ( cd $(1); $(TAR) -xf - )
  815. rm -rf \
  816. $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json
  817. endef
  818. define Package/ruby-logger/install
  819. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  820. usr/lib/ruby/$(PKG_LIBVER)/logger.rb \
  821. usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \
  822. usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \
  823. ) | ( cd $(1); $(TAR) -xf - )
  824. endef
  825. define Package/ruby-math/install
  826. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  827. usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
  828. usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
  829. usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
  830. usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
  831. usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
  832. usr/lib/ruby/$(PKG_LIBVER)/matrix \
  833. ) | ( cd $(1); $(TAR) -xf - )
  834. endef
  835. define Package/ruby-minitest/install
  836. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  837. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  838. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  839. # Remove tests (avoids extra deps)
  840. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
  841. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  842. endef
  843. define Package/ruby-misc/install
  844. $(INSTALL_DIR) $(1)/usr/lib
  845. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  846. usr/lib/ruby/$(PKG_LIBVER)/English.rb \
  847. usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \
  848. usr/lib/ruby/$(PKG_LIBVER)/base64.rb \
  849. usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \
  850. usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \
  851. usr/lib/ruby/$(PKG_LIBVER)/expect.rb \
  852. usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \
  853. usr/lib/ruby/$(PKG_LIBVER)/open3.rb \
  854. usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \
  855. usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \
  856. usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \
  857. usr/lib/ruby/$(PKG_LIBVER)/set.rb \
  858. usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \
  859. usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \
  860. usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \
  861. usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \
  862. usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \
  863. usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \
  864. usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \
  865. usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \
  866. usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \
  867. usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \
  868. usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \
  869. ) | ( cd $(1); $(TAR) -xf - )
  870. endef
  871. define Package/ruby-mkmf/install
  872. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  873. usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \
  874. usr/lib/ruby/$(PKG_LIBVER)/un.rb \
  875. ) | ( cd $(1); $(TAR) -xf - )
  876. endef
  877. define Package/ruby-multithread/install
  878. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  879. usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \
  880. usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \
  881. usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \
  882. usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \
  883. usr/lib/ruby/$(PKG_LIBVER)/sync.rb \
  884. usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \
  885. usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \
  886. usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \
  887. ) | ( cd $(1); $(TAR) -xf - )
  888. endef
  889. define Package/ruby-net/install
  890. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  891. usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \
  892. usr/lib/ruby/$(PKG_LIBVER)/net/* \
  893. ) | ( cd $(1); $(TAR) -xf - )
  894. endef
  895. define Package/ruby-nkf/install
  896. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  897. usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
  898. usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
  899. ) | ( cd $(1); $(TAR) -xf - )
  900. endef
  901. define Package/ruby-openssl/install
  902. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  903. usr/lib/ruby/$(PKG_LIBVER)/openssl \
  904. usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
  905. usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
  906. ) | ( cd $(1); $(TAR) -xf - )
  907. endef
  908. define Package/ruby-optparse/install
  909. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  910. usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
  911. usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
  912. usr/lib/ruby/$(PKG_LIBVER)/optparse \
  913. ) | ( cd $(1); $(TAR) -xf - )
  914. endef
  915. define Package/ruby-patterns/install
  916. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  917. usr/lib/ruby/$(PKG_LIBVER)/observer.rb \
  918. usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \
  919. usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \
  920. ) | ( cd $(1); $(TAR) -xf - )
  921. endef
  922. define Package/ruby-powerassert/install
  923. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  924. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  925. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  926. # Remove tests (avoids extra deps)
  927. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
  928. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  929. endef
  930. define Package/ruby-prettyprint/install
  931. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  932. usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
  933. usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \
  934. ) | ( cd $(1); $(TAR) -xf - )
  935. endef
  936. define Package/ruby-pstore/install
  937. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  938. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  939. endef
  940. define Package/ruby-psych/install
  941. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  942. usr/lib/ruby/$(PKG_LIBVER)/psych \
  943. usr/lib/ruby/$(PKG_LIBVER)/psych.rb \
  944. usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \
  945. usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \
  946. ) | ( cd $(1); $(TAR) -xf - )
  947. endef
  948. define Package/ruby-racc/install
  949. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  950. usr/lib/ruby/$(PKG_LIBVER)/racc \
  951. usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \
  952. ) | ( cd $(1); $(TAR) -xf - )
  953. endef
  954. define Package/ruby-rake/install
  955. $(INSTALL_DIR) $(1)/usr/bin
  956. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
  957. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  958. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  959. # Remove tests (avoids extra deps)
  960. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
  961. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  962. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  963. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  964. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \
  965. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  966. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  967. endef
  968. define Package/ruby-rbconfig/install
  969. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  970. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \
  971. usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \
  972. usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \
  973. ) | ( cd $(1); $(TAR) -xf - )
  974. endef
  975. define Package/ruby-rdoc/install
  976. $(INSTALL_DIR) $(1)/usr/bin
  977. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
  978. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
  979. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  980. # Remove tests (avoids extra deps)
  981. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
  982. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
  983. $(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
  984. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  985. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  986. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
  987. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  988. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \
  989. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
  990. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \
  991. $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  992. endef
  993. define Package/ruby-readline/install
  994. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  995. usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
  996. ) | ( cd $(1); $(TAR) -xf - )
  997. endef
  998. define Package/ruby-rexml/install
  999. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1000. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1001. endef
  1002. define Package/ruby-rinda/install
  1003. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1004. usr/lib/ruby/$(PKG_LIBVER)/rinda \
  1005. ) | ( cd $(1); $(TAR) -xf - )
  1006. endef
  1007. define Package/ruby-ripper/install
  1008. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1009. usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \
  1010. usr/lib/ruby/$(PKG_LIBVER)/ripper \
  1011. usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \
  1012. ) | ( cd $(1); $(TAR) -xf - )
  1013. endef
  1014. define Package/ruby-rss/install
  1015. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1016. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1017. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1018. endef
  1019. define Package/ruby-sdbm/install
  1020. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1021. usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \
  1022. ) | ( cd $(1); $(TAR) -xf - )
  1023. endef
  1024. define Package/ruby-shell/install
  1025. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1026. usr/lib/ruby/$(PKG_LIBVER)/shell.rb \
  1027. usr/lib/ruby/$(PKG_LIBVER)/shell \
  1028. ) | ( cd $(1); $(TAR) -xf - )
  1029. endef
  1030. define Package/ruby-socket/install
  1031. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1032. usr/lib/ruby/$(PKG_LIBVER)/gserver.rb \
  1033. usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \
  1034. usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \
  1035. usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \
  1036. usr/lib/ruby/$(PKG_LIBVER)/socket.rb \
  1037. usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \
  1038. ) | ( cd $(1); $(TAR) -xf - )
  1039. endef
  1040. define Package/ruby-testunit/install
  1041. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
  1042. $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
  1043. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
  1044. # Remove tests (avoids extra deps)
  1045. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
  1046. $(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
  1047. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
  1048. endef
  1049. define Package/ruby-unicodenormalize/install
  1050. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1051. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
  1052. usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
  1053. ) | ( cd $(1); $(TAR) -xf - )
  1054. endef
  1055. define Package/ruby-uri/install
  1056. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1057. usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
  1058. usr/lib/ruby/$(PKG_LIBVER)/uri \
  1059. ) | ( cd $(1); $(TAR) -xf - )
  1060. endef
  1061. define Package/ruby-webrick/install
  1062. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1063. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1064. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1065. endef
  1066. define Package/ruby-xmlrpc/install
  1067. $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
  1068. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1069. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
  1070. endef
  1071. define Package/ruby-yaml/install
  1072. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1073. usr/lib/ruby/$(PKG_LIBVER)/yaml \
  1074. usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
  1075. ) | ( cd $(1); $(TAR) -xf - )
  1076. endef
  1077. define Package/ruby-zlib/install
  1078. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1079. usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
  1080. ) | ( cd $(1); $(TAR) -xf - )
  1081. endef
  1082. define Build/InstallDev
  1083. ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
  1084. . \
  1085. ) | ( cd $(1); $(TAR) -xf - )
  1086. endef
  1087. $(eval $(call BuildPackage,ruby))
  1088. $(eval $(call BuildPackage,libruby))
  1089. $(eval $(call BuildPackage,ruby-stdlib))
  1090. $(eval $(call BuildPackage,ruby-bigdecimal))
  1091. $(eval $(call BuildPackage,ruby-cgi))
  1092. $(eval $(call BuildPackage,ruby-csv))
  1093. $(eval $(call BuildPackage,ruby-datetime))
  1094. $(eval $(call BuildPackage,ruby-dbm))
  1095. $(eval $(call BuildPackage,ruby-debuglib))
  1096. $(eval $(call BuildPackage,ruby-digest))
  1097. $(eval $(call BuildPackage,ruby-drb))
  1098. $(eval $(call BuildPackage,ruby-enc))
  1099. $(eval $(call BuildPackage,ruby-enc-extra))
  1100. $(eval $(call BuildPackage,ruby-erb))
  1101. $(eval $(call BuildPackage,ruby-fiddle))
  1102. $(eval $(call BuildPackage,ruby-filelib))
  1103. $(eval $(call BuildPackage,ruby-gdbm))
  1104. $(eval $(call BuildPackage,ruby-gems))
  1105. $(eval $(call BuildPackage,ruby-io-console))
  1106. $(eval $(call BuildPackage,ruby-irb))
  1107. $(eval $(call BuildPackage,ruby-json))
  1108. $(eval $(call BuildPackage,ruby-logger))
  1109. $(eval $(call BuildPackage,ruby-math))
  1110. $(eval $(call BuildPackage,ruby-minitest))
  1111. $(eval $(call BuildPackage,ruby-misc))
  1112. $(eval $(call BuildPackage,ruby-mkmf))
  1113. $(eval $(call BuildPackage,ruby-multithread))
  1114. $(eval $(call BuildPackage,ruby-net))
  1115. $(eval $(call BuildPackage,ruby-nkf))
  1116. $(eval $(call BuildPackage,ruby-openssl))
  1117. $(eval $(call BuildPackage,ruby-optparse))
  1118. $(eval $(call BuildPackage,ruby-patterns))
  1119. $(eval $(call BuildPackage,ruby-powerassert))
  1120. $(eval $(call BuildPackage,ruby-prettyprint))
  1121. $(eval $(call BuildPackage,ruby-pstore))
  1122. $(eval $(call BuildPackage,ruby-psych))
  1123. $(eval $(call BuildPackage,ruby-racc))
  1124. $(eval $(call BuildPackage,ruby-rake))
  1125. $(eval $(call BuildPackage,ruby-rbconfig))
  1126. $(eval $(call BuildPackage,ruby-rdoc))
  1127. $(eval $(call BuildPackage,ruby-readline))
  1128. $(eval $(call BuildPackage,ruby-rexml))
  1129. $(eval $(call BuildPackage,ruby-rinda))
  1130. $(eval $(call BuildPackage,ruby-ripper))
  1131. $(eval $(call BuildPackage,ruby-rss))
  1132. $(eval $(call BuildPackage,ruby-sdbm))
  1133. $(eval $(call BuildPackage,ruby-shell))
  1134. $(eval $(call BuildPackage,ruby-socket))
  1135. $(eval $(call BuildPackage,ruby-testunit))
  1136. $(eval $(call BuildPackage,ruby-unicodenormalize))
  1137. $(eval $(call BuildPackage,ruby-uri))
  1138. $(eval $(call BuildPackage,ruby-webrick))
  1139. $(eval $(call BuildPackage,ruby-xmlrpc))
  1140. $(eval $(call BuildPackage,ruby-yaml))
  1141. $(eval $(call BuildPackage,ruby-zlib))
  1142. $(eval $(call HostBuild))