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

_pkgname=thingutils
pkgname=$_pkgname-git

pkgver=20170126
_gitver='commit=4c04b4de8266caf326d8915f129d42e3e83e0575'
pkgdesc="Miscellaneous utilities by Luke Shumaker"
url="https://lukeshu.com/git/thingutils.git"
license=('MIT')

provides=($_pkgname)
conflicts=($_pkgname)

pkgrel=1
arch=('i686' 'x86_64')
optdepends=(
    'wdiff: for chardiff'
    'acpi: for batterymon or tempmon'
)
makedepends=('go')

source=("https://repo.parabola.nu/other/~lukeshu/$_pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('ee01884f973df6bb965f61053ff729c1')

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

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

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make install prefix=/usr DESTDIR="$pkgdir"
  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
}
