# Maintainer: Milan Knizek <knizek volny cz>
# Contributor: Milan Knizek <knizek volny cz>

pkgname=ebusd
#_gitname=ebusd
pkgver=1.1.0
_pkgver=1.1.0
pkgrel=1
pkgdesc="ebusd provides a communication interface to the energy bus (ebus)."
arch=('i686' 'x86_64' 'armv6h')
url=https://github.com/john30/ebusd/
license=('GPL3')
depends=()
optdepends=()
conflicts=('ebusd-git')
provides=('ebusd')
install=ebusd.install
options=()
backup=('etc/conf.d/ebusd')
source=("https://github.com/john30/ebusd/archive/v${_pkgver}.tar.gz" 'ebusd.service' 'ebusd_conf.d')

build() {
  cd "${srcdir}"/${pkgname}-${_pkgver}
  ./autogen.sh
  make -j1
}

package() {
  cd "${srcdir}"/${pkgname}-${_pkgver}
  make DESTDIR="$pkgdir" install

  install -d                       "${pkgdir}"/usr/lib/systemd/system
  install -m 0644 ../ebusd.service "${pkgdir}"/usr/lib/systemd/system
  install -d                       "${pkgdir}"/etc/conf.d
  install -m 0644 ../ebusd_conf.d  "${pkgdir}"/etc/conf.d/ebusd
}
md5sums=('b9db787417e7e59e0e872c84bdef52f1'
         '15b2fdb0a219fae6feecd539e8823864'
         'a2b4d5557fd90ea30e04358da62597fb')
