summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas2017-10-26 01:27:12 +0200
committerNiklas2017-10-26 01:27:12 +0200
commit4e3c0eae59543a5c0ca78722e4949dd82f0bcd01 (patch)
tree935e08171b0faaf3339a7db276fc001534718b0f
downloadaur-4e3c0eae59543a5c0ca78722e4949dd82f0bcd01.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD49
-rw-r--r--homegear-philipshue.install10
4 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b900509e2259
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = homegear-philipshue
+ pkgdesc = Philips Hue module for Homegear
+ pkgver = 0.7.10
+ pkgrel = 1
+ url = https://homegear.eu
+ install = homegear-philipshue.install
+ arch = x86_64
+ arch = i686
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = GPL3
+ depends = homegear
+ backup = etc/homegear/families/philipshue.conf
+ source = https://github.com/Homegear/Homegear-PhilipsHue/archive/0.7.10.tar.gz
+ sha512sums = 87022ee8c10281b9b9cf4b8fc1f3729e8c24dbf7f38d42bda47fd4327a82ac9bde113cae48ec7373cf589a89b0c0f743ea648e6c437673fa72366169cc0d352e
+
+pkgname = homegear-philipshue
+ backup = etc/homegear/families/philipshue.conf
+ backup = etc/homegear/devices/5/
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..afcd2f9b7f58
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+src/
+pkg/
+*.tar.gz
+*.tar.xz
+*.log
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aeffb389df3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Niklas <dev@n1klas.net>
+
+pkgname='homegear-philipshue'
+_gitname='Homegear-PhilipsHue'
+pkgdesc='Philips Hue module for Homegear'
+pkgver=0.7.10
+pkgrel=1
+arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
+license=('GPL3')
+url="https://homegear.eu"
+depends=('homegear')
+source=("https://github.com/Homegear/${_gitname}/archive/${pkgver}.tar.gz")
+sha512sums=('87022ee8c10281b9b9cf4b8fc1f3729e8c24dbf7f38d42bda47fd4327a82ac9bde113cae48ec7373cf589a89b0c0f743ea648e6c437673fa72366169cc0d352e')
+install=homegear-philipshue.install
+backup=('etc/homegear/families/philipshue.conf')
+
+prepare() {
+ cd "${srcdir}/${_gitname}-${pkgver}"
+
+ # Use the our version number instead of the script which would have fetched it from Github
+ sed -i -e "s#m4_esyscmd_s(\[./getVersion.sh\])#${pkgver}#" configure.ac
+ # Put the modules in /usr/lib instead of /var/lib because that is where they belong
+ sed -i -e 's#libdir = $(localstatedir)/lib/homegear/modules#libdir = $(prefix)/lib/homegear/modules#' src/Makefile.am
+}
+
+build() {
+ cd "${srcdir}/${_gitname}-${pkgver}"
+
+ ./bootstrap
+ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib
+ make
+}
+
+package() {
+ cd "${srcdir}/${_gitname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 misc/Config\ Directory/philipshue.conf "${pkgdir}"/etc/homegear/families/philipshue.conf
+ install -dm755 "${pkgdir}"/etc/homegear/devices/5
+ cp -r misc/Device\ Description\ Files/* "${pkgdir}"/etc/homegear/devices/5
+ chmod 644 "${pkgdir}"/etc/homegear/devices/5/*
+
+ cd "${pkgdir}"/etc/homegear/devices/5
+ for filename in *.xml
+ do
+ backup+=("etc/homegear/devices/5/${filename}")
+ done
+}
diff --git a/homegear-philipshue.install b/homegear-philipshue.install
new file mode 100644
index 000000000000..61b42157a639
--- /dev/null
+++ b/homegear-philipshue.install
@@ -0,0 +1,10 @@
+post_install() {
+ if [ "`systemctl is-active homegear`" == "active" ]
+ then
+ homegear -e mld mod_philipshue.so
+ fi
+}
+
+post_upgrade() {
+ post_install
+}