42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
pkgname=ruby-unicode-display_width
|
|
_gemname="${pkgname#ruby-}"
|
|
pkgver=2.2.0
|
|
pkgrel=1
|
|
pkgdesc='Determines the monospace display width of a string in Ruby'
|
|
arch=('any')
|
|
url='https://github.com/janlelis/unicode-display_width'
|
|
license=('MIT')
|
|
depends=('ruby')
|
|
makedepends=('ruby-rdoc')
|
|
options=('!emptydirs')
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
b2sums=('539ead4d7fd3c113c99b7886b6e1e00f39431a8a3690bfcd6cdfa11b954e7e96c78c88a821f734449e8f5acc377ed2573934bab6e36ec316f708fa720cbef271')
|
|
|
|
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
|
|
|
|
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" MIT-LICENSE.txt
|
|
}
|