1 # Contributor: Thomas Dziedzic <gostrc@gmail.com>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: John Proctor <jproctor@prium.net>
4 # Contributor: Jeramy Rutley <jrutley@gmail.com>
6 pkgname=(ruby ruby-docs)
10 url='https://www.ruby-lang.org/en/'
12 makedepends=(gdbm openssl libffi doxygen graphviz libyaml ttf-dejavu tk)
13 options=(!emptydirs !lto) # Disable LTO until fixes for https://bugs.ruby-lang.org/issues/18062 released
14 source=(https://cache.ruby-lang.org/pub/ruby/${pkgver:0:3}/ruby-${pkgver}.tar.xz)
15 sha512sums=('53bf7dd403b0c68af9691882ad8ed7422c8d1f496627428fb4c3caf0b0313715524b744c5f453aced2d49e16e55f3f45b46b9a77aa3097dbfcae7caa0208194b')
23 --localstatedir=/var \
24 --sharedstatedir=/var/lib \
25 --libexecdir=/usr/lib/ruby \
28 --with-dbm-type=gdbm_compat
40 pkgdesc='An object-oriented language for quick and easy programming'
41 depends=(gdbm openssl libffi libyaml libxcrypt gmp zlib rubygems ruby-irb)
43 'ruby-docs: Ruby documentation'
49 make DESTDIR="${pkgdir}" install-nodoc
51 install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby/LICENSE"
52 install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby/BSDL"
54 rubyver=${pkgver:0:3}.0
56 # remove rubygems as it shipped as a separate package
57 rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rubygems,rubygems.rb}
58 rm "${pkgdir}"/usr/bin/gem
60 # remove bundler as it shipped as a separate package
61 rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{bundler,bundler.rb}
62 rm "${pkgdir}"/usr/bin/{bundle,bundler}
63 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/bundler-*.gemspec
65 # remove bundled rdoc gem
66 rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rdoc,rdoc.rb}
67 rm "${pkgdir}"/usr/bin/{rdoc,ri}
68 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/rdoc-*.gemspec
69 rm "${pkgdir}"/usr/share/man/man1/ri.1
71 # remove irb as it is a separate package now
72 rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{irb,irb.rb}
73 rm "${pkgdir}"/usr/bin/irb
74 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/irb-*.gemspec
75 rm "${pkgdir}"/usr/share/man/man1/irb.1
77 # remove other binaries that are shipped as separate packages
78 rm "${pkgdir}"/usr/bin/{rake,rbs,typeprof,erb,racc}
79 rm "${pkgdir}"/usr/share/man/man1/erb.1
81 # remove all bundled gems to avoid conflicts with ruby-* Arch packages
82 rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/*
83 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/*.gemspec
84 rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/cache/*.gem
88 pkgdesc='Documentation files for ruby'
92 make DESTDIR="${pkgdir}" install-doc install-capi
94 install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby-docs/LICENSE"
95 install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby-docs/BSDL"