arch-pkgs/ruby-rubocop-ast/PKGBUILD

44 lines
1.3 KiB
Text
Raw Normal View History

2021-08-04 01:22:07 +00:00
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=rubocop-ast
pkgname=ruby-$_gemname
pkgver=1.14.0
2021-08-04 01:22:07 +00:00
pkgrel=1
pkgdesc="RuboCop's AST extensions and Node/NodePattern functionality"
arch=('any')
url="https://github.com/rubocop/rubocop-ast"
license=('MIT')
depends=('ruby' 'ruby-parser')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
sha512sums=('442a935ac61fb4e33969de3839f82c7121374be49bd3b6f5e190fc5bba67c1fdd79d6daf9a7af8107519bab55c9f8402ac39465f75d9b6bc5a0c953cebafb3a1')
b2sums=('f0e46ff917e3c484753b341af6ef88b6e17694df3393a469461eaf56e2a963c0a4da234645ca637484478bfb8cf8f23750c026efe97466ee4f616b45c4cce51d')
2021-08-04 01:22:07 +00:00
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install \
--verbose \
--ignore-dependencies \
--no-user-install \
--install-dir "$pkgdir/$_gemdir" \
--bindir "$pkgdir/usr/bin" \
"$_gemname-$pkgver.gem"
# delete cache
cd "$pkgdir/$_gemdir"
rm -vrf cache
cd "gems/$_gemname-$pkgver"
# move documentation
install -vd "$pkgdir/usr/share/doc/$pkgname"
mv -vt "$pkgdir/usr/share/doc/$pkgname" README.md
# move license
install -vd "$pkgdir/usr/share/licenses/$pkgname"
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
}