31 lines
1.1 KiB
Bash
31 lines
1.1 KiB
Bash
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
pkgname=nodejs-homebridge-platform-orbit
|
|
_pkgname="${pkgname#nodejs-}"
|
|
pkgver=1.4.5
|
|
pkgrel=1
|
|
pkgdesc="Homebridge plugin for Orbit Irrigation System"
|
|
arch=('any')
|
|
url="https://github.com/MortJC/homebridge-platform-orbit"
|
|
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=('1c4e2c643dd682a5d5d7ebba2def4037b020954512319dd32ebd09c02031ff227605a24a6f1d99a0fb670c083a20ca69a4d55704b4b7e59846595760344d6d82')
|
|
|
|
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"
|
|
}
|