app=sylpheed
version=3.7.0
build=1sml
homepage="https://sylpheed.sraoss.jp/en/"
download="https://osdn.net/dl/sylpheed/sylpheed-3.7.0.tar.xz"
desc="Simple, lightweight email client based on GTK+"
requires="openssl dbus-glib gtkspell"

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

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

  applypatch $srcdir/sylpheed-pop3-cram-md5.patch
  applypatch $srcdir/sylpheed-trayicon.patch

  CPPFLAGS="$CFLAGS -D_GNU_SOURCE" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --disable-nls 

  make
  make install DESTDIR=$pkg

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

sha512sums="
20beae25533995694809d14595f6b0bd1bbd1843363fdae8147c7ef0b5b8c4edc573c6d2a5bd3cfe2ed817cb94ae6eba3a8142684f6512384e854b59103f920b  sylpheed-3.7.0.tar.lz
9f59ddb37cc22bcd417b2150e2eafa36a3c2b66cfafda10ce38fc2a83cdecd9987d711aadbad4a0cab885fb06d03c2b999742c257811bcd5ef23c7ea3f4d7eb0  sylpheed-pop3-cram-md5.patch
5a673ec49c358b5157e50a8f2149073ab69156380b1b7da6b51045f1434a0e161adb45355bba8b243be38fbde1a8dd7f725def6ff91c45a5ca14e0f40fb3c1ef  sylpheed-trayicon.patch
"
