addpkg: ruby-tty-color 0.5.0-1
This commit is contained in:
parent
94515c836f
commit
34740cde5b
1 changed files with 43 additions and 0 deletions
43
ruby-tty-color/PKGBUILD
Normal file
43
ruby-tty-color/PKGBUILD
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||
|
||||
_gemname=tty-color
|
||||
pkgname=ruby-$_gemname
|
||||
pkgver=0.5.0
|
||||
pkgrel=1
|
||||
pkgdesc="Terminal color capabilities detection"
|
||||
arch=('any')
|
||||
url="https://github.com/piotrmurach/tty-color"
|
||||
license=('MIT')
|
||||
depends=('ruby')
|
||||
options=('!emptydirs')
|
||||
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
||||
noextract=("$_gemname-$pkgver.gem")
|
||||
b2sums=('fc22689783c86b5d18bd3134b198b2bdf50563bc14a25b8a02611ac6a46f494c86b17ff1307089a87ad92442d99da3d408b4907b83f3c67f495a66ceaaddc2ee')
|
||||
|
||||
package() {
|
||||
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
||||
|
||||
gem install \
|
||||
--ignore-dependencies \
|
||||
--no-user-install \
|
||||
--no-document \
|
||||
--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 tasks spec Rakefile "$_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.txt
|
||||
}
|
Loading…
Reference in a new issue