43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
pkgname=ruby-rubocop-ast
|
|
_gemname="${pkgname#ruby-}"
|
|
pkgver=1.18.0
|
|
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=('2549e2e3c61b85e5ffe3551bc84c314f462dfae2f5ca1c915b73a1293d856e43d712258aa6ca3f3e0c6ec6b46bc7c776a8652dfabc3f22645d3b448089403911')
|
|
b2sums=('6c00af2526a7f72733f28607c98d40a169eeb7c96417bc65aeaa6318a2c1d1e44d067ce653c2eb1bdb774210a957bd6d4a1e7509bad98d1e87d1fb1860e05437')
|
|
|
|
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
|
|
}
|