Browse Source

addpkg: ruby-dry-cli 0.7.0-1

primary
George Rawlinson 11 months ago
parent
commit
1bdbf270f2
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
  1. 44
      ruby-dry-cli/PKGBUILD

44
ruby-dry-cli/PKGBUILD

@ -0,0 +1,44 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=dry-cli
pkgname=ruby-$_gemname
pkgver=0.7.0
pkgrel=1
pkgdesc="A general-purpose framework for developing Command Line Interface applications"
arch=('any')
url="https://github.com/dry-rb/dry-cli"
license=('MIT')
depends=('ruby')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('8278f8a41288ffc20fda4baa378c3ca47f9c8a85c1a207a66e37a2831380037a426fc861a3584322a5b3bd136faa33bc0199f8611fad6be8a94bf617a202701f')
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"
rm -vrf "$_gemname.gemspec"
# 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
}
Loading…
Cancel
Save