# Description: A portable fork of the OpenBSD `doas` command
# URL: https://github.com/Duncaen/OpenDoas
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: linux-pam

name=opendoas
version=6.8.2
release=2
source=(https://github.com/Duncaen/OpenDoas/releases/download/v$version/$name-$version.tar.xz
  doas.pam better-wayland-support.patch)

build() {
  cd $name-$version
  patch -Np1 -i $SRC/better-wayland-support.patch
  ./configure --prefix=/usr \
    --with-timestamp
  make
  make DESTDIR=$PKG install
  install -Dm644 $SRC/doas.pam \
    $PKG/etc/pam.d/doas
}
