41 lines
1.1 KiB
Bash
41 lines
1.1 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=tty-which
|
|
pkgname=ruby-$_gemname
|
|
pkgver=0.4.2
|
|
pkgrel=1
|
|
pkgdesc="Cross-platform implementation of Unix 'which' command"
|
|
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=('9701534985a9fef2d2c6fee14cb8e1e817757b4e1e1504d4f5efcf8c1c01b41d3adf6d57ded84ac01190966e3fd96fd1cf5e85ebbdb6f03ebc4e18b7a6086c0b')
|
|
|
|
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
|
|
|
|
cd "gems/$_gemname-$pkgver"
|
|
|
|
# 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
|
|
}
|