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>
2022-06-13 21:49:38 +00:00
pkgname=ruby-rubocop-ast
_gemname="${pkgname#ruby-}"
2022-08-09 08:34:04 +00:00
pkgver=1.21.0
2021-08-04 01:22:07 +00:00
pkgrel=1
pkgdesc="RuboCop's AST extensions and Node/NodePattern functionality"
arch=('any')
2022-06-13 21:49:38 +00:00
url='https://github.com/rubocop/rubocop-ast'
2021-08-04 01:22:07 +00:00
license=('MIT')
depends=('ruby' 'ruby-parser')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
2022-08-09 08:34:04 +00:00
sha512sums=('b30653b0866dcf74ad136af1004d731f2c989b13c47c3c529483e378e89e09f5fdc1b622cfdcfd7e542a2cfbb8d230cbc37e05fadd2674b3b25d4cc549632e2f')
b2sums=('947eddde87310ecedcd8db35b0efe14befdeba080b28310e8680730e9d930c2527bed96831b3b506f85d1192efa2ae5f865340cb6a87bbb55427922b9fd37eff')
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
}