aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-02-08 16:27:42 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2016-02-08 16:27:48 +0100
commit8505d75d03edc3f4de416c444ceb96568dc9d900 (patch)
tree466a0e6eb592a26101262cbeb5e8b993a4a5d263 /testing
parent531bfdfee26a5a8788672be476ffa7c13a289a38 (diff)
downloadaports-8505d75d03edc3f4de416c444ceb96568dc9d900.tar.bz2
aports-8505d75d03edc3f4de416c444ceb96568dc9d900.tar.xz
testing/domoticz: add init support
Diffstat (limited to 'testing')
-rw-r--r--testing/domoticz/APKBUILD31
-rw-r--r--testing/domoticz/domoticz.confd6
-rw-r--r--testing/domoticz/domoticz.initd19
-rw-r--r--testing/domoticz/domoticz.pre-install4
4 files changed, 51 insertions, 9 deletions
diff --git a/testing/domoticz/APKBUILD b/testing/domoticz/APKBUILD
index 824e88621e..8f304be1d1 100644
--- a/testing/domoticz/APKBUILD
+++ b/testing/domoticz/APKBUILD
@@ -2,20 +2,24 @@
# Maintainer:
pkgname=domoticz
pkgver=20160207
-pkgrel=0
+pkgrel=1
pkgdesc="Open source Home Automation System"
url="http://www.domoticz.com/"
arch="all"
license="GPL"
depends=""
depends_dev=""
+pkgusers="$pkgname"
+pkggroups="$pkgname"
makedepends="cmake $depends_dev openssl-dev zlib-dev curl-dev boost-dev
- sqlite-dev lua5.2-dev mosquitto-dev libusb-dev libusb-compat-dev
+ sqlite-dev lua5.2-dev mosquitto-dev libusb-compat-dev
openzwave-dev"
-install=""
+install="$pkgname.pre-install"
subpackages=""
source="http://dev.alpinelinux.org/archive/domoticz/domoticz-$pkgver.tar.gz
3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
+ $pkgname.initd
+ $pkgname.confd
"
_builddir="$srcdir/domoticz-master"
@@ -49,16 +53,25 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
- mkdir -p "$pkgdir"/usr/bin "$pkgdir"/etc
+ mkdir -p "$pkgdir"/usr/bin
mv "$pkgdir"/var/lib/domoticz/domoticz \
"$pkgdir"/usr/bin/ || return 1
rm -f "$pkgdir"/var/lib/domoticz/updatedomo
- mv "$pkgdir"/var/lib/domoticz/Config \
- "$pkgdir"/etc/domoticz || return 1
+ chown -R $pkgname "$pkgdir"/var/lib/domoticz || return 1
+ install -D -m755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -D -m644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
}
md5sums="1092ea41a91d82f321b372e3b390c09c domoticz-20160207.tar.gz
-39295664197b86b9b67cce90220f8c10 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch"
+39295664197b86b9b67cce90220f8c10 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
+fa16b27db4149bd972e1bf349ced15bd domoticz.initd
+6771e150da2c75c824a95ce761d8a739 domoticz.confd"
sha256sums="33419077e8f45ab30084867d09271db359fb57cdc54dce8fafa09a2e2327bdec domoticz-20160207.tar.gz
-be6748531de484d5a40da4abde4989216b4d91a06b03639faa2943efcf71a8c0 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch"
+be6748531de484d5a40da4abde4989216b4d91a06b03639faa2943efcf71a8c0 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
+0f52ff8db5f679e99dc2dff09cf19d3d1f7e18167fc496370df4f89f60b255f8 domoticz.initd
+285013a126eb98ab78eaef3cce26b42361916418f6b6271233c0c878e69ee0f3 domoticz.confd"
sha512sums="19ea7391004c109199f913a6b08d8b4ad03c0e3f0405047e52d9c178735f309ae9e25748f0c297e4f777353e6cd78309049811b93a743390256f10abc27833a0 domoticz-20160207.tar.gz
-2d8ccffc508d9ee7360bd718187a3c9c1eee1356d415f8258259e52640e249dc5af5998c9c4d26e9d8fdf27b61e5b14607fbb55e1c531619a5df91a6d80b5e86 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch"
+2d8ccffc508d9ee7360bd718187a3c9c1eee1356d415f8258259e52640e249dc5af5998c9c4d26e9d8fdf27b61e5b14607fbb55e1c531619a5df91a6d80b5e86 3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
+d7cd5930071bc2213161e1fd09ff320c584197c42925fca118830e0bd93af00cfbad8147a14317f4cd32a4a8a0b4bdfb2985582ac822eff9145d97a451ee00a5 domoticz.initd
+f8026d0fc151e3d1a66946057b8b506a2210606602c55d34392c7d4cb3bd352735c2c402e565ecb79ac308bfea18111d61e05da06caf2982ed871749dbfb9f69 domoticz.confd"
diff --git a/testing/domoticz/domoticz.confd b/testing/domoticz/domoticz.confd
new file mode 100644
index 0000000000..14b6cca922
--- /dev/null
+++ b/testing/domoticz/domoticz.confd
@@ -0,0 +1,6 @@
+# domoticz settings
+user="domoticz"
+dbase="/var/lib/domoticz/domoticz.db"
+userdata="/var/lib/domoticz/"
+wwwroot="/var/lib/domoticz/www/"
+pidfile="/var/run/domoticz/domoticz.pid"
diff --git a/testing/domoticz/domoticz.initd b/testing/domoticz/domoticz.initd
new file mode 100644
index 0000000000..07e852b35e
--- /dev/null
+++ b/testing/domoticz/domoticz.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+name=domoticz
+command=/usr/bin/$name
+command_args="-dbase $dbase -userdata $userdata -wwwroot $wwwroot -pidfile $pidfile -syslog -daemon"
+command_background=YES
+start_stop_daemon_args="--user $user"
+
+depend() {
+ use logger dns
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner "$user" \
+ --mode 0775 /var/run/"$name"
+}
+
diff --git a/testing/domoticz/domoticz.pre-install b/testing/domoticz/domoticz.pre-install
new file mode 100644
index 0000000000..b8bfba4a96
--- /dev/null
+++ b/testing/domoticz/domoticz.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+adduser -H -D -s /sbin/nologin domoticz 2>/dev/null
+adduser domoticz usb
+exit 0