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-}"
|
2022-09-14 08:28:02 +00:00
|
|
|
pkgver=2.3.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')
|
2022-09-14 08:28:02 +00:00
|
|
|
makedepends=('git' 'ruby-rdoc')
|
2021-07-31 22:59:11 +00:00
|
|
|
options=('!emptydirs')
|
2022-09-14 08:28:02 +00:00
|
|
|
_commit='64497bb7886d00dfbc56b4b95aba93633ad5b4d3'
|
|
|
|
source=("$pkgname::git+$url#commit=$_commit")
|
|
|
|
b2sums=('SKIP')
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd "$pkgname"
|
|
|
|
|
|
|
|
git describe --tags | sed 's/^v//'
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$pkgname"
|
|
|
|
|
|
|
|
gem build "$_gemname.gemspec"
|
|
|
|
}
|
2021-07-31 22:59:11 +00:00
|
|
|
|
|
|
|
package() {
|
2022-09-14 08:28:02 +00:00
|
|
|
cd "$pkgname"
|
|
|
|
|
2021-07-31 22:59:11 +00:00
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
|
|
|
|
gem install \
|
2022-09-14 08:28:02 +00:00
|
|
|
--local \
|
2021-07-31 22:59:11 +00:00
|
|
|
--verbose \
|
|
|
|
--ignore-dependencies \
|
|
|
|
--no-user-install \
|
|
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
|
|
--bindir "$pkgdir/usr/bin" \
|
|
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
|
|
|
|
# delete cache
|
2022-09-14 08:28:02 +00:00
|
|
|
rm -vrf "$pkgdir/$_gemdir/cache"
|
2021-07-31 22:59:11 +00:00
|
|
|
|
2022-09-14 08:28:02 +00:00
|
|
|
# license
|
|
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" MIT-LICENSE.txt
|
2021-07-31 22:59:11 +00:00
|
|
|
}
|