# Maintainer: PktSurf <smlinux@pktsurf.in>
app=mutt
version=1.10.1
build=3sml
homepage="https://www.mutt.org"
download="http://ftp.mutt.org/pub/mutt/mutt-$version.tar.gz"
desc="Advanced text-mode mail client"
requires="netbsd-curses zlib libidn openssl cyrus-sasl"

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

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

build() {
  LDFLAGS="-lterminfo" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc/mutt \
    --enable-imap \
    --enable-pop \
    --enable-smtp \
    --with-ssl \
    --with-sasl \
    --disable-doc \
    --with-homespool=/var/spool 

  make
  make install DESTDIR=$pkg

  cp GPL COPYRIGHT $pkgdocs/

  mkfinalpkg
}

sha512sums="
82e33fbec999f0397b2e2b189dffe6b13e159c4ef5a44f87fa88894a02e24b00f61e8c808d206963e47a9b62b9ebfa025cb444a06866dbc21471ba10116a07eb  mutt-1.10.1.tar.lz
"
