42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=rubocop-ast
|
|
pkgname=ruby-$_gemname
|
|
pkgver=1.11.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")
|
|
b2sums=('a9b36cd8fcd18c329f46af855196ce0b32fa24896f63379460b52a15f0102c504d4c225039a7a2103f6da83a5bef20cc3fc6e8e7af3faeadc205c752cc631582')
|
|
|
|
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
|
|
}
|