app=ntfs-3g
version=2021.8.22
build=1sml
homepage="http://www.tuxera.com/community/open-source-ntfs-3g/"
download="https://tuxera.com/opensource/ntfs-3g_ntfsprogs-$version.tgz"
desc="NTFS read-write filesystem driver"
requires="netbsd-curses util-linux fuse"
noautoconfsite=1

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

  tar xf $srcdir/$app"_ntfsprogs"-$version.tgz
  cd $app"_ntfsprogs"-$version
  fixbuilddirpermissions

  ./configure \
    --prefix="/" \
    --sbindir=/bin \
    --disable-static \
    --with-fuse=internal

  make
  make install DESTDIR=$pkg

  cp COPYING* $pkgdocs/

  (
    cd $pkg ; mv sbin/* bin/
    rmdir sbin
  )

  mkfinalpkg
}

sha512sums="
e0544df78a6c352999e1206d7b5d71c56e39396b7a0936a261d728c2ac9d61c6b95ef297f8529ac2a5146f31c1c9e43066d3e281064d4f5d781a04eba51f536d  ntfs-3g_ntfsprogs-2021.8.22.tgz
"
