# Maintainer: PktSurf <smlinux@pktsurf.in>
app=fuse2
version=2.9.5
build=2sml
homepage="https://github.com/libfuse/libfuse"
download="https://github.com/libfuse/libfuse/releases/download/fuse-$version/fuse-$version.tar.xz"
desc="Interface to export virtual filesystem in userspace"
requires="musl"

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

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

build() {
  INIT_D_PATH="/etc/rc.d" \
  MOUNT_FUSE_PATH="/bin" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --enable-lib \
    --enable-shared \
    --disable-static 

  make
  make install DESTDIR=$pkg

  rm -rv $pkg/dev
  mv $pkg/etc/rc.d/fuse $pkg/etc/rc.d/rc.fuse2.new

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

sha512sums="
8d24254a26314a3c2f84108cd3aadc357b9ac943edd279f6fcd86c1821238ac01817880cfc994172b50a07bf74ead1e3bb44faf17eee81cca3baf3a6a960e823  fuse-2.9.5.tar.lz
"
