summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bcc391fe3c06f78cee6bbb3bfcef11ff84cb6549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

# Maintainer: Andrea Feletto <andrea@andreafeletto.com>

pkgname=nodejs-string-width
_pkgname=${pkgname#*-}
pkgver=4.2.0
pkgrel=2
pkgdesc='Get the visual width of a string.'
arch=('any')
url='https://github.com/sindresorhus/string-width'
license=('MIT')
depends=(
    'nodejs'
    'nodejs-emoji-regex'
    'nodejs-is-fullwidth-code-point'
    'nodejs-strip-ansi'
)
makedepends=('npm')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/sindresorhus/$_pkgname/archive/v$pkgver.tar.gz")
noextract=("$_pkgname-$pkgver.tar.gz")
sha256sums=('ed442beb06ff8beb24235a38af520b971befdfb68fba6ae7130cf7f402efc6d8')

package() {
    cd "$srcdir"

    npm install --user root --global --prefix "$pkgdir/usr" \
        "$_pkgname-$pkgver.tar.gz"

    install -Dm644 \
        "$pkgdir/usr/lib/node_modules/$_pkgname/license" \
        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}