blob: a8af0209a383049f6bb83bbda3a6511d1624a47d (
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: Jonas Amundsen <jonasba+aur at gmail dot com>
_npmname=cordova
pkgname=nodejs-$_npmname
pkgver=9.0.0
pkgrel=2
pkgdesc="Cordova command line interface tool"
arch=('any')
url="http://cordova.apache.org/"
license=('Apache')
depends=('nodejs' 'npm')
optdepends=('apache-ant: building for Android'
'android-platform: building for Android'
'android-sdk-build-tools: building for Android')
source=(https://registry.npmjs.org/$_npmname/-/$_npmname-${pkgver//_/-}.tgz)
noextract=($_npmname-${pkgver//_/-}.tgz)
sha1sums=('2bba968d9e3339f9c8dace443a77f4d37ed1fe46')
package() {
cd "$srcdir"
local _npmdir="$pkgdir/usr/lib/node_modules/"
mkdir -p "$_npmdir"
cd "$_npmdir"
npm install -g --prefix "$pkgdir/usr" $_npmname@${pkgver//_/-}
# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/cli/issues/1103 for details.
find "${pkgdir}/usr" -type d -exec chmod 755 {} +
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
}
|