52 lines
1.3 KiB
Bash
52 lines
1.3 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
# Contributor: Mario Finelli <mario at finel dot li>
|
|
# Contributor: farwayer <farwayer at gmail dot com>
|
|
|
|
_gemname=rubocop
|
|
pkgname=ruby-$_gemname
|
|
pkgver=1.20.0
|
|
pkgrel=1
|
|
pkgdesc="A Ruby static code analyzer and formatter"
|
|
arch=('any')
|
|
depends=(
|
|
'ruby'
|
|
'ruby-parallel'
|
|
'ruby-parser'
|
|
'ruby-rainbow'
|
|
'ruby-regexp_parser'
|
|
'ruby-rexml'
|
|
'ruby-rubocop-ast'
|
|
'ruby-ruby-progressbar'
|
|
'ruby-unicode-display_width'
|
|
)
|
|
makedepends=('ruby-rdoc')
|
|
options=('!emptydirs')
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
b2sums=('406c368cc2185123e782bd471fefc0ae7ea8aa76fba5c48231d7e99c9cc9203421f582171ac174c497e068f502bbfbfcd53c0a759cc0e0e3804cbedba8850b58')
|
|
|
|
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
|
|
}
|