2021-07-31 22:59:11 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
|
2022-06-27 08:10:21 +00:00
|
|
|
pkgname=ruby-unicode-display_width
|
|
|
|
_gemname="${pkgname#ruby-}"
|
|
|
|
pkgver=2.2.0
|
2021-07-31 22:59:11 +00:00
|
|
|
pkgrel=1
|
2022-06-27 08:10:21 +00:00
|
|
|
pkgdesc='Determines the monospace display width of a string in Ruby'
|
2021-07-31 22:59:11 +00:00
|
|
|
arch=('any')
|
2022-06-27 08:10:21 +00:00
|
|
|
url='https://github.com/janlelis/unicode-display_width'
|
2021-07-31 22:59:11 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby')
|
|
|
|
makedepends=('ruby-rdoc')
|
|
|
|
options=('!emptydirs')
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2022-06-27 08:10:21 +00:00
|
|
|
b2sums=('539ead4d7fd3c113c99b7886b6e1e00f39431a8a3690bfcd6cdfa11b954e7e96c78c88a821f734449e8f5acc377ed2573934bab6e36ec316f708fa720cbef271')
|
2021-07-31 22:59:11 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|