summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 025eb2c5824dc9318b7199b6950317292a58963d (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
# Maintainer: 	whitels <2959471117 at qq dot com>

_npmname=whistle
_npmver=2.9.70
_npmrel=1
pkgname=nodejs-whistle # All lowercase
pkgver=2.9.70
pkgrel=1
pkgdesc="HTTP, HTTP2, HTTPS, Websocket debugging proxy"
arch=(any)
url="https://github.com/avwo/whistle"
license=(MIT)
depends=('nodejs' 'npm')
optdepends=()
source=(
	"https://registry.npmjs.org/${_npmname}/-/${_npmname}-${_npmver}.tgz"
	"whistle.desktop"
	"${pkgname}.png::https://raw.githubusercontent.com/avwo/whistle/master/biz/webui/htdocs/img/whistle.png"
)
noextract=(${_npmname}-${_npmver}.tgz)
sha1sums=('2cccf1acb31e4aa9bb7a69fb80bf30463b542397'
          'ad7056273ff8d5c2798b4ab870f5981288a67c60'
          '74d44892ab7cac4c4b3f56b24158605ede05c984')

package() {
	cd $srcdir
	install -Dm 644 whistle.desktop -t "${pkgdir}"/usr/share/applications/
	install -Dm 644 nodejs-whistle.png "${pkgdir}"/usr/share/icons/hicolor/160x160/apps/nodejs-whistle.png
	local _npmdir="$pkgdir/usr/lib/node_modules/"
	mkdir -p $_npmdir
	cd $_npmdir
	npm install -g --prefix "$pkgdir/usr" $_npmname@$_npmver
	chown -R root:root "$pkgdir"
}

# vim:set ts=2 sw=2 et: