# Contributor: Jan de Groot <jgc@archlinux.org>
# Maintainer: Carl Smedstad <carsme@archlinux.org>

pkgname=libutempter
pkgver=1.2.3
pkgrel=1
pkgdesc="Interface for terminal emulators to record user sessions to utmp and wtmp files"
arch=('x86_64' 'aarch64')
url="https://github.com/altlinux/libutempter"
license=('LGPL-2.1-or-later')
depends=('glibc')
makedepends=(
  'git'
  'systemd'
)
source=(
  "git+$url.git?signed#tag=$pkgver-alt1"
  "$pkgname.tmpfiles"
)
sha256sums=('d14d00fa879d79732f8f6815eef384de9f3265e2ae3ba0cbe0a2dcf70434b694'
            '8fc708052bab79f707bacaa66fa1529808bc7e72316faf4038ad9c763ec7e80d')
validpgpkeys=(296D6F29A020808E8717A8842DB5BD89A340AEB7) # Dmitry V. Levin <ldv@altlinux.org>

build() {
  cd $pkgname/$pkgname
  make
}

package() {
  cd $pkgname/$pkgname
  make DESTDIR="$pkgdir" install

  install -vDm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
