summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Penen2022-12-29 10:19:14 +0100
committerArturo Penen2022-12-29 10:19:14 +0100
commit2f7038f08965d2d6486644fe57411979dce37cf6 (patch)
tree1ad26ed3620b51f3e2ba98d55984627d28bb9a42
parent725b1d0fdb9bd4643264d59a9ab9e8940386550a (diff)
downloadaur-2f7038f08965d2d6486644fe57411979dce37cf6.tar.gz
chore: Farzat suggestion build changes
Signed-off-by: Arturo Penen <arturo.penen@diagroup.com>
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD15
2 files changed, 15 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 75da6280abff..97eadd945842 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,15 @@
pkgbase = wscat
pkgdesc = Netcat-like utility for WebSockets
pkgver = 5.2.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/websockets/wscat
arch = x86_64
arch = i686
license = MIT
makedepends = npm
depends = nodejs
+ noextract = wscat-5.2.0.tgz
+ source = https://registry.npmjs.org/wscat/-/wscat-5.2.0.tgz
+ sha256sums = e8c4bb9bc66a2303c0e6a3f2cf2a0cc04ec29ccca8ae0371eda499e3811717a8
pkgname = wscat
diff --git a/PKGBUILD b/PKGBUILD
index 69c6c42326fa..55afda789d8e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,22 @@
# Maintainer: Arturo Penen <apenen@gmail.com>
-pkgname=wscat
+_pkgname=wscat
+pkgname="$_pkgname"
pkgver=5.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="Netcat-like utility for WebSockets"
url="https://github.com/websockets/wscat"
arch=("x86_64" "i686")
license=("MIT")
+source=("https://registry.npmjs.org/$_pkgname/-/$_pkgname-$pkgver.tgz")
+noextract=("${_pkgname}-${pkgver}.tgz")
+sha256sums=('e8c4bb9bc66a2303c0e6a3f2cf2a0cc04ec29ccca8ae0371eda499e3811717a8')
depends=("nodejs")
makedepends=("npm")
package() {
- export npm_config_prefix="${pkgdir}/usr"
- npm install -g wscat@${pkgver}
+ npm install -g --cache "${srcdir}/npm-cache" --prefix "${pkgdir}/usr" "${srcdir}/${_pkgname}-${pkgver}.tgz"
+
+ # npm gives ownership of ALL FILES to build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "${pkgdir}"
}