addpkg: ruby-rubocop-ast 1.8.0-1
This commit is contained in:
parent
c2d63b65ee
commit
1e345d8c9c
1 changed files with 42 additions and 0 deletions
42
ruby-rubocop-ast/PKGBUILD
Normal file
42
ruby-rubocop-ast/PKGBUILD
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||
|
||||
_gemname=rubocop-ast
|
||||
pkgname=ruby-$_gemname
|
||||
pkgver=1.8.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=('613a25655c31c49c50288fd4432120b80a365727c1e7a3c10d3f47b1189e9fa4ec0e2a7bb7420a1b4f0827b4a950e1749bd8d32b1b903f2d486055f2932deb50')
|
||||
|
||||
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
|
||||
}
|
Loading…
Reference in a new issue