# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

_pkgname=systemd-timesyncd-wait
pkgver=20180426
pkgdesc="Proper time-sync.target support for systemd-timesyncd"
url="https://lukeshu.com/git/$_pkgname.git"
license=('Apache')

pkgrel=1
arch=('i686' 'x86_64' 'armv7h')
depends=('systemd>=235' 'systemd<239')
conflicts=('systemd>=239')
makedepends=('go')
source=("https://repo.parabola.nu/other/~lukeshu/$_pkgname/$_pkgname-$pkgver.tar.gz"{,.sig})
sha256sums=('f7d7bb2fd0c9b00091789bd866cedb92d0046478d870f1fabbad64d691f979d1'
            'SKIP')
validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker

pkgname=$_pkgname-git
provides=($_pkgname)
conflicts=($_pkgname)

_gitver='commit=d7850fb58ba3d0b727ef6d73206101eb6d16b7f3'
mkdepends=('git')
mksource=("$_pkgname-$pkgver::git://git.lukeshu.com/$_pkgname.git#$_gitver")
mkmd5sums=('SKIP')

_makeflags=(
  prefix=/usr
)

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  make "${_makeflags[@]}"
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  make  "${_makeflags[@]}" install DESTDIR="$pkgdir"
}
