2021-08-03 20:56:54 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
|
2022-06-13 21:37:43 +00:00
|
|
|
pkgname=ruby-slop
|
|
|
|
_gemname="${pkgname#ruby-}"
|
|
|
|
pkgver=4.9.2
|
2021-08-03 20:56:54 +00:00
|
|
|
pkgrel=1
|
2022-06-13 21:37:43 +00:00
|
|
|
pkgdesc='A simple option parser with an easy to remember syntax and friendly API'
|
2021-08-03 20:56:54 +00:00
|
|
|
arch=('any')
|
2022-06-13 21:37:43 +00:00
|
|
|
url='https://github.com/leejarvis/slop'
|
2021-08-03 20:56:54 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby')
|
|
|
|
makedepends=('ruby-rdoc')
|
|
|
|
options=('!emptydirs')
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2022-06-13 21:37:43 +00:00
|
|
|
b2sums=('bb104d0cd4cbb6201592b0c3d7f6d5273ffcdfaa30277fe4b794aefacc8f2d480feb54642d5c0609c1853d3f3afde75a1eeee4f0ff854d33251b1ebe6bbc26b7')
|
2021-08-03 20:56:54 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# delete unnecessary files & folders
|
|
|
|
cd "gems/$_gemname-$pkgver"
|
|
|
|
find . -type f -name ".*" -delete
|
|
|
|
rm -vrf test "$_gemname.gemspec" Gemfile Rakefile
|
|
|
|
|
|
|
|
# move documentation
|
|
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
mv -vt "$pkgdir/usr/share/doc/$pkgname" *.md
|
|
|
|
|
|
|
|
# move license
|
|
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
|
|
|
}
|