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

34 lines
1.2 KiB
Text
Raw Normal View History

# Maintainer: George Rawlinson <george@rawlinson.net.nz>
pkgname=nodejs-homebridge-denon-tv
_pkgname="${pkgname#nodejs-}"
pkgver=3.11.0
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")
b2sums=('b79eb2a4cc185844bebaec674cf407a898996950d9a5ff7b74d08df80bdd04ae082f1e039baa3c4b58693aa0f15e1a1b6b817a84f91ee41b9e81e9ac6abbc726')
package() {
local NPM_FLAGS=(--no-audit --no-fund --no-update-notifier)
npm install --global --prefix "$pkgdir/usr" "$_pkgname-$pkgver.tar.gz" "${NPM_FLAGS[@]}"
# 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"
}