addpkg: ruby-unicode-display_width 2.0.0-1
This commit is contained in:
parent
d2730546ac
commit
3e1d31468c
1 changed files with 42 additions and 0 deletions
42
ruby-unicode-display_width/PKGBUILD
Normal file
42
ruby-unicode-display_width/PKGBUILD
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||
|
||||
_gemname=unicode-display_width
|
||||
pkgname=ruby-$_gemname
|
||||
pkgver=2.0.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=('07466b71e62a05b1e7779666bc30ef0a24c5d8d022640a178bb59be8f1690f4e0257c3a65b6104b772fa1b5109c9e9fa453e94474c563bd6d44f0c8a69408ddf')
|
||||
|
||||
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
|
||||
}
|
Loading…
Reference in a new issue