arch-pkgs/ruby-parallel/PKGBUILD

51 lines
1.5 KiB
Text
Raw Normal View History

2021-07-28 07:25:56 +00:00
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Mario Finelli <mario at finel dot li>
# Contributor: Benjamin Chrétien <chretien dot b plus aur at gmail dot com>
_gemname=parallel
pkgname=ruby-$_gemname
pkgver=1.21.0
pkgrel=1
2021-07-28 07:25:56 +00:00
pkgdesc="Ruby: parallel processing made simple and fast"
arch=('any')
url="https://github.com/grosser/parallel"
license=('MIT')
depends=('ruby')
makedepends=('ruby-rdoc')
2021-07-28 07:25:56 +00:00
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('bdb2234feb3b6b3935ffb334673d76bcd0714157fc96d56110b6584887a9227f76aca45e8bf2f449a713da8b19b781caf49fadaa6d020f634d06dae174f40271')
2021-07-28 07:25:56 +00:00
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install \
--verbose \
2021-07-28 07:25:56 +00:00
--ignore-dependencies \
--no-document \
2021-07-28 07:25:56 +00:00
--no-user-install \
--install-dir "$pkgdir/$_gemdir" \
--bindir "$pkgdir/usr/bin" \
"$_gemname-$pkgver.gem"
# delete cache
cd "$pkgdir/$_gemdir"
rm -vrf cache
# move license
cd "gems/$_gemname-$pkgver"
install -vd "$pkgdir/usr/share/licenses/$pkgname"
mv -vt "$pkgdir/usr/share/licenses/$pkgname" MIT-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"
2021-07-28 07:25:56 +00:00
}