archrelease: copy trunk to extra-x86_64
[arch-packages.git] / rubygems / trunk / PKGBUILD
blobf7a3a893d3777695419477e775bc1b50dd2ec132
1 # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
3 pkgname=rubygems
4 pkgdesc='Package management framework for Ruby'
5 pkgver=3.3.5
6 pkgrel=1
7 arch=(any)
8 url='https://rubygems.org/'
9 license=(MIT)
10 # To avoid circular dependency with ruby, move it to makedepends
11 makedepends=(ruby)
12 backup=(etc/gemrc)
13 checkdepends=(rake)
14 source=(rubygems-$pkgver.zip::https://github.com/rubygems/rubygems/archive/v${pkgver}.zip
15         stop_so_duplication.patch
16         gemrc)
17 sha512sums=('0295ff734b0b37be854de186ac0938f2c866e409fbb33d3ba3fe82d395556d10016a440969639ea2354256a9800149d0b8cf284438dab33d47ee918f7f37f2de'
18             '9919490bbf7dba979a1df7543e62eb3fca48e8a516e6b6ab0a73080952e1b58599b7f233259d122dc66bf93f032b434d70e0dd448a1cb86513f01acb51b2120e'
19             '8cafd14d414ee3c16aa94f79072bc6c100262f925dc1300e785846c3fabbbbffc1356b8e2223af5684e3340c55032d41231179ffa948bb12e01dbae0f4131911')
21 prepare() {
22   cd rubygems-${pkgver}
23   patch -p1 < ../stop_so_duplication.patch
26 check() {
27   cd rubygems-${pkgver}
29   # disable as it requires a lot of ruby-* dependencies
30   #rake test
33 package() {
34   depends+=(ruby)
35   cd rubygems-${pkgver}
37   install -D -m644 "${srcdir}"/gemrc "${pkgdir}/etc/gemrc"
39   local rubyver=$(ruby --version | sed -r 's|^ruby ([[:digit:]]+\.[[:digit:]]+\.).*$|\1|')0
41   install -d "${pkgdir}/usr/lib/ruby/${rubyver}/"
42   install -D -m755 bin/gem "${pkgdir}/usr/bin/gem"
43   cp -r lib/* "${pkgdir}/usr/lib/ruby/${rubyver}/"
44   install -D -m644 MIT.txt "${pkgdir}/usr/share/licenses/rubygems/MIT.txt"