summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ae1efc9941e73e1d828fb797218838d09de98845 (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
# Maintainer:  Dimitris Kiziridis <ragouel at outlook dot com>
# Contributor: Jaron Viƫtor <thulinma@thulinma.com>
# Contributor: Jameson Pugh <imntreal@gmail.com>

pkgname=domoticz
pkgver=2020.1
pkgrel=2
pkgdesc="Web based home automation"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
url='https://www.domoticz.com'
license=('GPL-3.0')
depends=('libusb-compat'
         'curl'
         'sqlite'
         'boost-libs'
         'lua'
         'mosquitto'
         'python')
makedepends=('git'
             'cmake'
             'boost'
             'python')
install='domoticz.install'
source=("https://github.com/domoticz/domoticz/archive/${pkgver}.tar.gz"
        'domoticz.service')
md5sums=('00ea7ab5c3f6de94fe590b8cf99a7e1f'
         'c13a3f5d04142587d159820156a6223f')

prepare() {
  mkdir -p "${srcdir}/${pkgname}-${pkgver}/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_OPENSSL_STATIC=NO \
  -DUSE_PYTHON=YES \
  ..
}

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

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"
  install -Dm644 ${srcdir}/${pkgname}-${pkgver}/License.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  rm "${pkgdir}/opt/domoticz/License.txt"
}
# vim:set ts=2 sw=2 et: