# Maintainer: PktSurf <smlinux@pktsurf.in>
app=sudo
version=1.9.12p2
build=3sml
homepage="https://www.sudo.ws/"
download="https://www.sudo.ws/dist/sudo-$version.tar.gz"
desc="give limited root privileges to certain users"
requires="zlib"
noautoconfsite=1

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --docdir="/share/doc/$app-$version" \
    --with-env-editor \
    --disable-pam-session \
    --without-pam

  make
  make install DESTDIR=$pkg

  mv $pkg/etc/sudoers $pkg/etc/sudoers.new

  mkfinalpkg
}

sha512sums="
27dbfbdaaefc4aef666bd205fe9386214c264c52f2133396bf8c8b7f5d2fefeab40b5a83ef80fe0cf1c1b434de4ef2aca358487f24d0663a5b7fd9e98dc3baed  sudo-1.9.12p2.tar.lz
"
