git » ruby-rspec-mocks.git » main » tree

[main] / PKGBUILD

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Artem Vorotnikov <artem@vorotnikov.me>

_gemname=rspec-mocks
pkgname=ruby-${_gemname}
pkgver=3.12.6
pkgrel=1
pkgdesc="RSpecs 'test double' framework, with support for stubbing and mocking"
url='https://github.com/rspec/rspec-mocks'
arch=('any')
license=('MIT')
depends=('ruby-rspec-support' 'ruby-diff-lcs')
options=('!emptydirs')
source=(https://rubygems.org/downloads/${_gemname}-${pkgver}.gem)
noextract=(${_gemname}-${pkgver}.gem)
sha512sums=('982505b46c4ddee7a91bd2473d08b9cf0dbc431394a356f7e72306f5fa5e8895f6df378fc32e1fd48a3f3a4ad06393da90124ed164bf620d9f3b0894797a44a9')

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
  find "${pkgdir}"
  install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README"
  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
}

# vim: ts=2 sw=2 et: