Browse Source

upgpkg: ruby-unicode-display_width 2.3.0-1

primary
George Rawlinson 2 weeks ago
parent
commit
0eb62ccd39
Signed by: grawlinson
GPG Key ID: E0959FEA8B550539
  1. 39
      ruby-unicode-display_width/PKGBUILD

39
ruby-unicode-display_width/PKGBUILD

@ -2,23 +2,38 @@
pkgname=ruby-unicode-display_width
_gemname="${pkgname#ruby-}"
pkgver=2.2.0
pkgver=2.3.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')
makedepends=('git' 'ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('539ead4d7fd3c113c99b7886b6e1e00f39431a8a3690bfcd6cdfa11b954e7e96c78c88a821f734449e8f5acc377ed2573934bab6e36ec316f708fa720cbef271')
_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"
}
package() {
cd "$pkgname"
local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install \
--local \
--verbose \
--ignore-dependencies \
--no-user-install \
@ -27,16 +42,8 @@ package() {
"$_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
rm -vrf "$pkgdir/$_gemdir/cache"
# move license
install -vd "$pkgdir/usr/share/licenses/$pkgname"
mv -vt "$pkgdir/usr/share/licenses/$pkgname" MIT-LICENSE.txt
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" MIT-LICENSE.txt
}

Loading…
Cancel
Save