aboutsummaryrefslogtreecommitdiffstats
path: root/testing/domoticz/APKBUILD
blob: a8ea06c9ea5b8d0bb761d8c02a1e67b27d5792e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=domoticz
pkgver=20160207
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-compat-dev
	openzwave-dev"
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"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	cmake \
		-DBUILD_SHARED_LIBS=True \
		-DUSE_STATIC_LIBSTDCXX=OFF \
		-DOpenZWave=/usr/lib/libopenzwave.so \
		-DUSE_STATIC_OPENZWAVE=OFF \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/var/lib/domoticz \
		-DUSE_BUILTIN_LUA=OFF \
		-DUSE_BUILTIN_MQTT=OFF \
		-DUSE_BUILTIN_SQLITE=OFF \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	mkdir -p "$pkgdir"/usr/bin
	mv "$pkgdir"/var/lib/domoticz/domoticz \
		 "$pkgdir"/usr/bin/ || return 1
	rm -f "$pkgdir"/var/lib/domoticz/updatedomo
	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
559725b8354c850c8a29f0083cc208f7  domoticz.initd
6771e150da2c75c824a95ce761d8a739  domoticz.confd"
sha256sums="33419077e8f45ab30084867d09271db359fb57cdc54dce8fafa09a2e2327bdec  domoticz-20160207.tar.gz
be6748531de484d5a40da4abde4989216b4d91a06b03639faa2943efcf71a8c0  3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
082a6b656ef530603137f03a67101ca3a676c362ed3a84f9a138d6113cb4f13c  domoticz.initd
285013a126eb98ab78eaef3cce26b42361916418f6b6271233c0c878e69ee0f3  domoticz.confd"
sha512sums="19ea7391004c109199f913a6b08d8b4ad03c0e3f0405047e52d9c178735f309ae9e25748f0c297e4f777353e6cd78309049811b93a743390256f10abc27833a0  domoticz-20160207.tar.gz
2d8ccffc508d9ee7360bd718187a3c9c1eee1356d415f8258259e52640e249dc5af5998c9c4d26e9d8fdf27b61e5b14607fbb55e1c531619a5df91a6d80b5e86  3d203dcfe6fef7c8ff5d0dbc030b7b7934406999.patch
337c1999675620532b0763ea9c9d630baf344c8b8a40afe7e487e8e07383fb6ecd10307c310c42894fd95f5d20c573484b5318356e52980e0e05026472295e3e  domoticz.initd
f8026d0fc151e3d1a66946057b8b506a2210606602c55d34392c7d4cb3bd352735c2c402e565ecb79ac308bfea18111d61e05da06caf2982ed871749dbfb9f69  domoticz.confd"