APP=spacefm
VERSION=1.0.6
BUILD=1sml
HOMEPAGE="https://ignorantguru.github.io/spacefm/"
DOWNLOAD="https://github.com/IgnorantGuru/spacefm/archive/refs/tags/1.0.6.tar.gz"
DESC="Multi-panel tabbed file manager"
REQUIRES="gcc-libs zlib netbsd-curses libidn libtasn1 gmp libjpeg-turbo gnutls eudev nettle openssl gtk2 ffmpeg"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  patch -p1 < $SRCDIR/spacefm-include-sysmacros.patch

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

  make
  make install DESTDIR=$PKG

  cp COPYING* $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
03cbb9bdcaa955ed3645c65a0b6f0d59e7279590dedabe68a833437d5ba4ae5e100894cb74bca1713233aa2767b53d35d45b97f4bd350d238a2bdc8959be7fc5  spacefm-1.0.6.tar.lz
d7b33441700141dc956df54f03393c02783fc5188b82883401d4781c52fb383089af5ed3b3645b686078a6ac06d3b3e269f7ee5ab3f4d1416ebb0141fbaa7b7e  spacefm-include-sysmacros.patch
"
