archrelease: copy trunk to community-any
[ArchLinux/community.git] / phonegap / repos / community-x86_64 / PKGBUILD
blob538107809578e1dfe94a91accfcc4d10b3c7751e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=phonegap
4 pkgver=9.0.0
5 pkgrel=2
6 pkgdesc="PhoneGap command-line interface and node.js library"
7 arch=('x86_64')
8 url="https://github.com/phonegap/phonegap-cli"
9 license=('Apache')
10 depends=('cordova' 'nodejs-nopt' 'semver')
11 makedepends=('npm' 'python')
12 install=${pkgname}.install
13 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
14 noextract=($pkgname-$pkgver.tgz)
15 sha512sums=('072b05307843eb42dfbf1a7c58f0a9dd43eb29ef5ef718e99771e741b78dd10c19d0d5704892b1fd4c1068a09ab8a1f1a7680241283cf31afa1e573aca75dea2')
17 package() {
18   npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
20   # Non-deterministic race in npm gives 777 permissions to random directories.
21   # See https://github.com/npm/npm/issues/9359 for details.
22   chmod -R u=rwX,go=rX "$pkgdir"
24   # npm installs package.json owned by build user
25   # https://bugs.archlinux.org/task/63396
26   chown -R root:root "$pkgdir"
28   # Delete npm installed pyc files
29   find "$pkgdir" -name "*.pyc" -delete
31   # Experimental dedup
32   rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/{,.bin/}cordova
33   rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/{,.bin/}nopt
34   rm -r "$pkgdir"/usr/lib/node_modules/$pkgname/node_modules/{,.bin/}semver
37 # vim:set ts=2 sw=2 et: