summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Feletto2020-11-13 11:51:51 +0100
committerAndrea Feletto2020-11-13 11:51:51 +0100
commit7d100f57554b73612a5803b57f63da47c57cae0c (patch)
treef899fa9fc4f8717acc984c655c1846f712f4bda9
downloadaur-7d100f57554b73612a5803b57f63da47c57cae0c.tar.gz
version 4.2.0
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD28
2 files changed, 43 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0763d3a5fe13
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = nodejs-string-width
+ pkgdesc = Get the visual width of a string.
+ pkgver = 4.2.0
+ pkgrel = 1
+ url = https://github.com/sindresorhus/string-width
+ arch = any
+ license = MIT
+ makedepends = npm
+ depends = nodejs
+ noextract = string-width-4.2.0.tar.gz
+ source = string-width-4.2.0.tar.gz::https://github.com/sindresorhus/string-width/archive/v4.2.0.tar.gz
+ sha256sums = ed442beb06ff8beb24235a38af520b971befdfb68fba6ae7130cf7f402efc6d8
+
+pkgname = nodejs-string-width
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f25a5307fd5e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+
+# Maintainer: Andrea Feletto <andrea@andreafeletto.com>
+
+pkgname=nodejs-string-width
+_pkgname=${pkgname#*-}
+pkgver=4.2.0
+pkgrel=1
+pkgdesc='Get the visual width of a string.'
+arch=('any')
+url='https://github.com/sindresorhus/string-width'
+license=('MIT')
+depends=('nodejs')
+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"
+}
+