Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/ruby-rake-bootstrap/PKGBUILD
blob: e8db910a277799c04d2afae23cccfeab66b8ec79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>

_gemname=rake
pkgname=ruby-$_gemname-bootstrap
pkgver=13.0.6
pkgrel=1
pkgdesc='Make-like build tool implemented in Ruby'
provides=(rake)
arch=(any)
url='https://ruby.github.io/rake/'
license=(MIT)
depends=(ruby)
options=(!emptydirs)
source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
noextract=($_gemname-$pkgver.gem)
sha512sums=('9dbcd1ef4d93f4853b3da40b29890509bb260e13e5500f5a0502645ce762d6e50ee7dd6bd59d08d135868dab579e10344920ba246079cde7048e3510bd473ea2')

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
  rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
}

# building with ruby-bootstrap in /opt/ruby-xxx, but install into /usr
# and depend on 'ruby'
makedepends+=(ruby-bootstrap)
depends=()

# install to bootstrap locatio /opt/ruby-xxx
eval "$(
  declare -f package | \
    sed '
      /local _gemdir/ a mkdir -p "${pkgdir}"/opt/ruby-bootstrap-3.0.4/bin
      /local _gemdir/ i export PATH="/opt/ruby-bootstrap-3.0.4/bin:${PATH}"
      s|-n "$pkgdir/usr/bin"|-n "$pkgdir/opt/ruby-bootstrap-3.0.4/bin"|
    '
)"

unset check