summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfee74966e97be6e75fb1b19ea7774e9df85dba2 (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
# Maintainer: Jameson Pugh <imntreal@gmail.com>

pkgname=domoticz
pkgver=3.8153
pkgrel=2
pkgdesc="Web based home automation"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
url="http://www.domoticz.com"
license=('GPL')
depends=('openzwave' 'libusb-compat' 'curl' 'sqlite' 'boost-libs' 'lua' 'mosquitto')
makedepends=('git' 'cmake' 'boost')
install='domoticz.install'
source=("https://github.com/domoticz/domoticz/archive/${pkgver}.tar.gz"
        'domoticz.service'
        'boost1.66.patch')
sha256sums=('5ea8f37f2ef900e9bd17b1b5375e75bfdec4f09001e3e2e0b647a260989d014c'
            '52ea28893fc70a278a728f975c249ace48e48f595c9da01895bde115e8e6b255'
            '04bf1daa167c00f621715578e6d6631cc059b7d7ca3741e44b2b7b316a2cf3a5')

prepare() {
  mkdir -p "${srcdir}/${pkgname}-${pkgver}/build"
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ../boost1.66.patch
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}/build"
  cmake -DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/opt/domoticz \
	-DUSE_STATIC_OPENZWAVE=NO \
	-DUSE_BUILTIN_LUA=NO \
  -DUSE_BUILTIN_MQTT=NO \
  -DUSE_BUILTIN_SQLITE=NO \
  -DUSE_BUILTIN_ZLIB=NO \
  -DUSE_STATIC_BOOST=NO \
  -DUSE_STATIC_LIBSTDCXX=NO \
  -DUSE_STATIC_OPENZWAVE=NO \
  ..
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}/build

  make DESTDIR=${pkgdir} install 
  chmod o+r "${pkgdir}/opt/domoticz/updatedomo"
  mkdir -p "${pkgdir}/usr/lib/systemd/system"
  cp ${srcdir}/domoticz.service "${pkgdir}/usr/lib/systemd/system/"
  chown -R http:http "${pkgdir}/opt/domoticz"
}

# vim:set ts=2 sw=2 et: