addpkg: ruby-slop 4.9.1-1
This commit is contained in:
parent
4c4761357c
commit
0aff28c5bf
1 changed files with 45 additions and 0 deletions
45
ruby-slop/PKGBUILD
Normal file
45
ruby-slop/PKGBUILD
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||||
|
|
||||||
|
_gemname=slop
|
||||||
|
pkgname=ruby-$_gemname
|
||||||
|
pkgver=4.9.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A simple option parser with an easy to remember syntax and friendly API"
|
||||||
|
arch=('any')
|
||||||
|
url="https://github.com/leejarvis/slop"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('ruby')
|
||||||
|
makedepends=('ruby-rdoc')
|
||||||
|
options=('!emptydirs')
|
||||||
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
||||||
|
noextract=("$_gemname-$pkgver.gem")
|
||||||
|
b2sums=('88bb3f013846b8574639f28b938845867b4fd22df4a8e20b33a8b1b6178a77f19ddf05d085d514dffd5868c10a7996bf79b53bcf6a6d55e4af69f4f59a591b1a')
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in a new issue