# Contributor: Carlo Landmeter # Maintainer: pkgname=domoticz pkgver=0_git20160214 pkgrel=5 pkgdesc="Open source Home Automation System" url="http://www.domoticz.com/" arch="x86_64 x64" 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="" giturl="https://github.com/domoticz/domoticz.git" disturl="dev.alpinelinux.org:/archive/$pkgname" source="http://dev.alpinelinux.org/archive/domoticz/domoticz-$pkgver.tar.gz $pkgname.initd $pkgname.confd " _builddir="$srcdir/domoticz-$pkgver" 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 \ "$pkgdir"/usr/share/$pkgname || return 1 mv "$pkgdir"/var/lib/domoticz/domoticz \ "$pkgdir"/usr/bin/ || return 1 mv "$pkgdir"/var/lib/domoticz/www \ "$pkgdir"/usr/share/$pkgname/ || return 1 mv "$pkgdir"/var/lib/domoticz/Config \ "$pkgdir"/usr/share/$pkgname/ || 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="efd24da757ee95b721744b39eb114fd8 domoticz-0_git20160214.tar.gz c7a183cf8d3df2d0dd14380d13694847 domoticz.initd e5ecebdcc238af91a89081a115530175 domoticz.confd" sha256sums="b170a4e91f456032b175e59bba043922c650254978c321f0fed29eb7e5878fff domoticz-0_git20160214.tar.gz 4701360626f3951102e8b827031d2099f241a003123bc9114237ba67b24e2845 domoticz.initd 155e9c33c5a99bb32e925c834b2530451640a8a58e39aa63e358401711d67ff3 domoticz.confd" sha512sums="fa1cf347961435710ded56e08e9335526ec124c044bfaf308858b2e7cfd1c77ec6361f60a6c7992d2c02cd04168b3bda46ade1921c0656d5f40c1265688c68eb domoticz-0_git20160214.tar.gz 3ddbd3848cce2247a52e4673307a078717d75cb3fea2937d9f2442d94dccd0efc63120f1b0324c7091ae158cd0ec4fd36334af43bb887d45ff4a93e6a96e9bd2 domoticz.initd 724440da335f1e22c8dc181df62dac9ad2bcca98b39bff059de4be5901a93a0a8cb6864d92262092041d796ee7d3933f62cf337316d35a800bbb44f84a1709e0 domoticz.confd"