53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
|
# 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.18.4
|
||
|
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=('ad98f2386a78233cfc0e02822a38117537b7cdb93a05fb2bf1626fe3ebb7aa6bb1d7ce1bac502212bf463cb222f3261bde7f04dfb375aa7323deb1c8ac9602c0')
|
||
|
|
||
|
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
|
||
|
}
|