arch-pkgs/nodejs-homebridge-denon-tv/PKGBUILD

32 lines
1.1 KiB
Text
Raw Normal View History

# Maintainer: George Rawlinson <george@rawlinson.net.nz>
pkgname=nodejs-homebridge-denon-tv
_pkgname="${pkgname#nodejs-}"
2021-08-07 03:50:51 +00:00
pkgver=3.10.77
pkgrel=1
pkgdesc="Homebridge plugin for Denon/Marantz AV receivers"
arch=('any')
url="https://github.com/grzegorz914/homebridge-denon-tv"
license=('MIT')
depends=('homebridge')
makedepends=('npm')
options=('!strip')
source=("$_pkgname-$pkgver.tar.gz::https://registry.npmjs.org/$_pkgname/-/$_pkgname-$pkgver.tgz")
noextract=("$_pkgname-$pkgver.tar.gz")
2021-08-07 03:50:51 +00:00
b2sums=('e583c2d2fd24bd533bfc75c64e2d20dff7b0ba153e4974195c5e171f9871ddb050c3d78a17e72f52b9e22f35b69cfbfc33d83bd9fcdb1f6d9f3df4c7444f81cf')
package() {
npm install --global --prefix "$pkgdir/usr" "$_pkgname-$pkgver.tar.gz"
# 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"
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
"$pkgdir/usr/lib/node_modules/$_pkgname/LICENSE"
}