# Maintainer: PktSurf <smlinux@pktsurf.in>
app=fuse3
version=3.10.5
build=1sml
homepage="https://github.com/libfuse/libfuse"
download="https://github.com/libfuse/libfuse/archive/refs/tags/fuse3-$version.tar.gz"
desc="Filesystem in Userspace v3"
requires="udev"

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

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

build() {
  mkdir -p smbuild && cd smbuild
  sed -i 's@/etc/init.d/fuse3@/etc/rc.d/rc.fuse.new@g' ../util/install_helper.sh
  meson .. \
    --prefix="/" \
    --sbindir=bin \
    -Dexamples=false

  ninja
  DESTDIR="$pkg" ninja install

  cp ../LICENSE $pkgdocs

  rm -rv $pkg/dev

  mkfinalpkg
}

sha512sums="
d4c397ae6522cc841099e76bb1e11493555e1f2767169cd6980aa64eed6f41a27f19d1282d6f521e1602c533f58ef90af5b1b4bdf86dc032d7316cceba57ead1  fuse-3.10.5.tar.lz
"
