aboutsummaryrefslogtreecommitdiffstats
path: root/community/domoticz/APKBUILD
blob: e9c2d608f369c63e1962b6dcde7b222cd43f495e (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=domoticz
pkgver=3.8153
pkgrel=2
pkgdesc="Open source Home Automation System"
url="http://www.domoticz.com/"
arch="all !armhf !armv7"
license="GPL"
pkgusers="$pkgname"
pkggroups="$pkgname"
makedepends="cmake libressl-dev zlib-dev curl-dev boost-dev sqlite-dev
	lua5.2-dev mosquitto-dev libusb-compat-dev openzwave-dev python3-dev
	"
install="$pkgname.pre-install"
source="domoticz-$pkgver.tar.gz::https://github.com/domoticz/domoticz/archive/$pkgver.tar.gz
	boost-1.66.patch
	domoticz.confd
	domoticz.initd
	"
builddir="$srcdir/domoticz-$pkgver"

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
	make
}

check() {
	"$builddir"/$pkgname --help > /dev/null
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/bin \
		"$pkgdir"/usr/share/$pkgname
	mv "$pkgdir"/var/lib/domoticz/domoticz \
		"$pkgdir"/usr/bin/
	mv "$pkgdir"/var/lib/domoticz/www \
		"$pkgdir"/usr/share/$pkgname/
	mv "$pkgdir"/var/lib/domoticz/Config \
		"$pkgdir"/usr/share/$pkgname/
	rm -f "$pkgdir"/var/lib/domoticz/updatedomo

	chown -R $pkgname "$pkgdir"/var/lib/domoticz

	install -D -m755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -D -m644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="6c4e30b28fa4a5969ddf8a2c275e390394087b036af795921b114c7a734e966b546b33dd353b9aeefce39b30ce502067aadc8616c0fb25b3d97d58aa31922786  domoticz-3.8153.tar.gz
42f89bf2311f20ce6fc4e1d24d6f7443f1572936aa813e364319a1d8eccf539f6ade593cbb00aceb98d24350cefd127b06e3c1c78083edec3c3e108e4aca7a02  boost-1.66.patch
724440da335f1e22c8dc181df62dac9ad2bcca98b39bff059de4be5901a93a0a8cb6864d92262092041d796ee7d3933f62cf337316d35a800bbb44f84a1709e0  domoticz.confd
3ddbd3848cce2247a52e4673307a078717d75cb3fea2937d9f2442d94dccd0efc63120f1b0324c7091ae158cd0ec4fd36334af43bb887d45ff4a93e6a96e9bd2  domoticz.initd"