summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2018-09-07 01:56:15 +0800
committerlilac2018-09-07 01:56:15 +0800
commitae489c9fa596440f213758376814d4cc295b8c63 (patch)
tree983f21db395cd3e472a75af40793049459cd6277
parentdf3c06527db721490b014c59e20240fe4b9485af (diff)
downloadaur-ae489c9fa596440f213758376814d4cc295b8c63.tar.gz
update by lilac
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD29
2 files changed, 19 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3908a78e4c57..33c125ca71c0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = nodejs-web-ext
pkgdesc = A command line tool to help build, run, and test web extensions
pkgver = 2.9.1
- pkgrel = 1
+ pkgrel = 3
url = https://developer.mozilla.org/en-US/Add-ons/WebExtensions
arch = any
license = MPL2
- makedepends = npm
+ makedepends = yarn
+ makedepends = node-gyp
makedepends = python2
depends = nodejs
+ options = !strip
source = https://registry.npmjs.org/web-ext/-/web-ext-2.9.1.tgz
sha256sums = c9a0502df328f40a26457c31b59c3986497bec18d5f99c4272f7e2d6aa100ba8
diff --git a/PKGBUILD b/PKGBUILD
index c7c45ce0c486..4737ad6bf3b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,37 @@
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
_npmname=web-ext
-pkgname=nodejs-$_npmname # All lowercase
+pkgname=nodejs-$_npmname
pkgver=2.9.1
-pkgrel=1
+pkgrel=3
pkgdesc='A command line tool to help build, run, and test web extensions'
arch=(any)
url='https://developer.mozilla.org/en-US/Add-ons/WebExtensions'
license=('MPL2')
depends=('nodejs')
-makedepends=('npm' 'python2')
+makedepends=('yarn' 'node-gyp' 'python2')
+# to speed up the build
+options=('!strip')
source=(https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz)
sha256sums=('c9a0502df328f40a26457c31b59c3986497bec18d5f99c4272f7e2d6aa100ba8')
+build() {
+ cd package
+
+ PYTHON=python2 yarn install --production
+}
+
package() {
local _npmdir="$pkgdir/usr/lib/node_modules/"
- cd "$srcdir"
-
- mkdir -p $_npmdir
+ install -Ddm755 "$_npmdir"
cp -r --no-preserve=ownership package "$_npmdir/$_npmname"
- cd "$_npmdir/$_npmname"
- PYTHON=python2 npm install --production
+ # remove references to $pkgdir
+ rm -r "$pkgdir"/usr/lib/node_modules/web-ext/node_modules/dtrace-provider/build/
- mkdir -p "$pkgdir/usr/bin"
+ install -Ddm755 "$pkgdir/usr/bin"
ln -s "/usr/lib/node_modules/$_npmname/bin/$_npmname" "$pkgdir/usr/bin/$_npmname"
-
- # Ref: https://wiki.archlinux.org/index.php/Node.js_package_guidelines
- # Non-deterministic race in npm gives 777 permissions to random directories.
- # See https://github.com/npm/npm/issues/9359 for details.
- find "${pkgdir}"/usr -type d -exec chmod 755 {} +
}
# vim:set ts=2 sw=2 et: