app=fuse
version=2.9.5
build=1sml
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"

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

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

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --enable-lib \
    --enable-shared \
    --disable-static 

  make
  make install DESTDIR=$pkg

  mv $pkg/sbin/* $pkg/bin/ ; rmdir $pkg/sbin

  mkdir -p $pkg/etc/rc.d
  mv $pkg/etc/init.d/fuse $pkg/etc/rc.d/rc.fuse.new
  rm -rf $pkg/etc/init.d

  cp COPYING* $pkgdocs/

  mkfinalpkg
}

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