summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAidan Harris2017-11-30 19:36:10 +0000
committerAidan Harris2017-11-30 19:36:10 +0000
commit225d2e4ec1c17df6462434c14107134ce58a3823 (patch)
tree707349b99a8223bac4456ed4a24ec446427ff421 /PKGBUILD
downloadaur-225d2e4ec1c17df6462434c14107134ce58a3823.tar.gz
Initial Commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..78bfe291c03
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: ahrs <Forward dot to at hotmail dot co dot uk>
+
+pkgname=homebridge-git
+_gitname=homebridge
+pkgver=0.4.32.r1.gb670ec1
+pkgrel=1
+pkgdesc="HomeKit support for the impatient"
+arch=('any')
+url="https://github.com/nfarina/homebridge"
+license=('apache')
+depends=('nodejs>=4.3.2' 'avahi')
+makedepends=('git' 'npm')
+provides=('homebridge')
+conflicts=('homebridge')
+options=(!emptydirs)
+source=(
+ "git+${url}.git"
+ "${_gitname}-system.service"
+ "${_gitname}-user.service"
+ "${_gitname}.install"
+)
+sha256sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+
+install="${_gitname}.install"
+
+pkgver() {
+ cd "${srcdir}/${_gitname}"
+ git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}"
+
+ # Fix error with npm5 issue
+ tar -czf homebridge.tar.gz homebridge
+}
+
+package() {
+ cd "${srcdir}/${_gitname}"
+
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_gitname}"
+ npm install --cache ../cache --user root -g --prefix "${pkgdir}/usr" ../*.tar.gz
+
+ install -D -m644 "${srcdir}/${_gitname}-system.service" "$pkgdir/usr/lib/systemd/system/${_gitname}.service"
+ install -D -m644 "${srcdir}/${_gitname}-user.service" "$pkgdir/usr/lib/systemd/user/${_gitname}.service"
+}
+
+# vim:set ts=2 sw=2 et: