app=gftp
version=2.0.19
build=1sml
homepage="https://github.com/masneyb/gftp"
download="https://github.com/masneyb/gftp/archive/refs/tags/2.0.19.tar.gz"
desc="Multi-threaded GTK FTP client for X"
requires="openssl gtk2"

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

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

  applypatch $srcdir/gftp.glibc-2.30.diff
  applypatch $srcdir/gftp.expand.path.sigsegv.diff
  applypatch $srcdir/gftp.desktop.diff
  applypatch $srcdir/fsplib.h.patch 

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    $builddist

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
5331b62a6e10bcc7cd7e12143ea8d0b0de517c77ba676d8981a9c1419e026dda7ce9d7155730e37deecb62ef96bff8db09a756b39bfcd4772bde72a88e6440b4  gftp-2.0.19.tar.lz
1e3a84244920eeeed3a35d7d80bc66cdf5226e56e9a8b2d069f2d9d94ee2b2013823dbc0a7ed24f8a06193b81ae876001c06575d627f68ffc1ea58298b22e9ce  fsplib.h.patch
0315ca0bcf5cecb6059481a4260dc17ea885b66460da4b6c9ec545c1f7a7ca095f2de8d628ad89de6d4b74b5eedf44d469c101f54bdafabb627995d40e0838af  gftp.desktop.diff
8c8650b67defab611e31ffb819d78561cc72c4d7b806bc355a038521b85af111a2cce4376aa788f20280338f241a8c3ee6fdb0737e3ed9a83e873e87ac19d6a7  gftp.expand.path.sigsegv.diff
58611bf94787f5adbe45bcc869876a02bef7cd45a6007d9c370592944612cb842b630ffa4cb279b9cb5a90b516474cb20287c212b35977c6db620e52a2684135  gftp.glibc-2.30.diff
"
