summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3dab3db8d990ef03f0ddf5b1b039ca704fdeb38 (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
34
35
36
37
38
39
# Maintainer: Yen Chi Hsuan <yan12125 at gmail.com>
_pkgname=nwjs
pkgname=$_pkgname-bin
pkgver=0.20.1
pkgrel=1
pkgdesc="node-webkit is an app runtime based on Chromium and node.js."
arch=("i686" "x86_64")
url="https://github.com/nwjs/nw.js"
license=("MIT")
depends=("alsa-lib" "gconf" "gtk2" "nss" "ttf-font" "libxtst" "libxss")
optdepends=(
    "nodejs: npm package support"
    "nw-gyp: native add-on build tool for node-webkit"
)
provides=("node-webkit" "nwjs")
replaces=("node-webkit")
conflicts=("node-webkit" "nwjs")

if [ "$CARCH" = "i686" ]; then
  _arch="ia32"
fi
if [ "$CARCH" = "x86_64" ]; then
  _arch="x64"
fi
source_common="http://dl.nwjs.io/v$pkgver/$_pkgname-v$pkgver-linux"
source_i686=("$source_common-ia32.tar.gz")
source_x86_64=("$source_common-x64.tar.gz")
sha512sums_i686=('3e486c3f4ce29cb20e1c721050a1e3928d7f29b0cc6b5cbdb036e020546b2077f912f897594ab4b2bbdd801cec2c6894782387e25187de363bb97a849df3faf6')
sha512sums_x86_64=('ae4545367b7565d5c75e140ffadd7b9181a21f2e9afda6808e670a9b7da1457108e4138819d30222ede346a99c303e831115c13826f08bdfd9bebc7e3bfef18e')

package() {
  cd "$srcdir/$_pkgname-v$pkgver-linux-$_arch"
  install -Ddm755 "$pkgdir/opt/$_pkgname"
  install -Ddm755 "$pkgdir/usr/bin"
  chmod -R +r *
  chmod +x nw lib lib/lib{ffmpeg,node,nw}.so locales
  cp -r * "$pkgdir/opt/$_pkgname"
  ln -s "/opt/$_pkgname/nw" "$pkgdir/usr/bin/nw"
}