rmpkg: ruby-rubocop & ruby-rubocop-ast

This commit is contained in:
George Rawlinson 2022-11-13 20:06:07 +13:00
parent ac745a26f0
commit fec39886de
Signed by: grawlinson
GPG key ID: E0959FEA8B550539
2 changed files with 0 additions and 109 deletions

View file

@ -1,43 +0,0 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=ruby-rubocop-ast
_gemname="${pkgname#ruby-}"
pkgver=1.21.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")
sha512sums=('b30653b0866dcf74ad136af1004d731f2c989b13c47c3c529483e378e89e09f5fdc1b622cfdcfd7e542a2cfbb8d230cbc37e05fadd2674b3b25d4cc549632e2f')
b2sums=('947eddde87310ecedcd8db35b0efe14befdeba080b28310e8680730e9d930c2527bed96831b3b506f85d1192efa2ae5f865340cb6a87bbb55427922b9fd37eff')
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
}

View file

@ -1,66 +0,0 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Mario Finelli <mario at finel dot li>
# Contributor: farwayer <farwayer at gmail dot com>
pkgname=ruby-rubocop
_gemname="${pkgname#ruby-}"
pkgver=1.36.0
pkgrel=1
pkgdesc='A Ruby static code analyzer and formatter'
arch=('any')
url='https://rubocop.org'
license=('MIT')
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")
sha512sums=('7b6e01bf2f6e9f98484aa256968434a1c35684dd136e503681b6f89fdc7342c3da3d24afbb1f299abb30329d2b3b6ee19e09a0930604f1741ed67c8d10c78596')
b2sums=('b705411fc7c9a45b33ece452a6f7393cf1f0ec707e96b512e76108123db548f6fe06fe382d0047cb12ddea744f23e50e372194ceb31bf0c4188b629549f29176')
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install \
--verbose \
--ignore-dependencies \
--no-document \
--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
# 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"
}