2021-08-04 01:28:22 +00:00
|
|
|
# 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
|
2021-10-22 06:29:19 +00:00
|
|
|
pkgver=1.22.2
|
2021-08-04 01:28:22 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A Ruby static code analyzer and formatter"
|
|
|
|
arch=('any')
|
2021-09-13 21:18:13 +00:00
|
|
|
url="https://rubocop.org"
|
|
|
|
license=('MIT')
|
2021-08-04 01:28:22 +00:00
|
|
|
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")
|
2021-10-22 06:29:19 +00:00
|
|
|
sha512sums=('5ecf61d8fab65692a806434f9534f087455ba5d1385a5ea47c09f6f5e5f4a17c09522228876640959e807192cb0b61020e00ba21ae1f16a4424a1b3fee9e6bbd')
|
|
|
|
b2sums=('2787b1afe63bf93e7a11d409df4f500d13524ed363030b92637e3000f79cdca071423c089aedd52d5439c5a31d801ba9e5a5cb4bed14755a93c612ee2b11bbdc')
|
2021-08-04 01:28:22 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
|
|
|
|
gem install \
|
|
|
|
--verbose \
|
|
|
|
--ignore-dependencies \
|
2021-09-13 21:18:13 +00:00
|
|
|
--no-document \
|
2021-08-04 01:28:22 +00:00
|
|
|
--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
|
2021-09-13 21:18:13 +00:00
|
|
|
|
|
|
|
# generate reproducible documentation
|
|
|
|
install -vd "$pkgdir/$_gemdir/doc/$_gemname-$pkgver"
|
|
|
|
cd "$pkgdir/$_gemdir/gems/$_gemname-$pkgver"
|
|
|
|
rdoc \
|
|
|
|
--format ri \
|
|
|
|
--output "$pkgdir$_gemdir/doc/$_gemname-$pkgver/ri" \
|
|
|
|
./lib
|
|
|
|
# delete unnecessary rdoc metadata file
|
|
|
|
rm -f "$pkgdir$_gemdir/doc/$_gemname-$pkgver/ri/created.rid"
|
2021-08-04 01:28:22 +00:00
|
|
|
}
|