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>
|
|
|
|
|
2022-06-15 00:41:41 +00:00
|
|
|
pkgname=ruby-rubocop
|
|
|
|
_gemname="${pkgname#ruby-}"
|
2022-07-07 17:44:33 +00:00
|
|
|
pkgver=1.31.2
|
2021-08-04 01:28:22 +00:00
|
|
|
pkgrel=1
|
2022-06-15 00:41:41 +00:00
|
|
|
pkgdesc='A Ruby static code analyzer and formatter'
|
2021-08-04 01:28:22 +00:00
|
|
|
arch=('any')
|
2022-06-15 00:41:41 +00:00
|
|
|
url='https://rubocop.org'
|
2021-09-13 21:18:13 +00:00
|
|
|
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")
|
2022-07-07 17:44:33 +00:00
|
|
|
sha512sums=('7760c57cc5f1b57ec7a93ad86d78fbb316aeb803616466f2dd03323b6f0b5b5bbf436e4f077e3c54a766c082974f1c37acd1f81aa71d4e12bd690dc4dda8d64b')
|
|
|
|
b2sums=('06b5d411b923183da61754d8642f83e314400a6065beb5abdf360995b344fce2f80fa99d42c1ce083aef64de0916671a9b7b43e37b1ad23c48590f609d263cb2')
|
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
|
|
|
}
|