# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libtorrent
version=0.13.8
build=1sml
homepage="https://github.com/rakshasa/libtorrent"
download="https://github.com/rakshasa/libtorrent/archive/refs/tags/v$version.tar.gz"
desc="C++ torrent library with focus on high performance and good code"
requires="gcc-libs zlib openssl"

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

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

build() {
  ./configure \
    --prefix= \
    --disable-debug \
    --without-kqueue \
    --enable-aligned \
    --with-posix-fallocate \
    --disable-static

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
e17d49d8858b53e692f7d8d2c312b517d375a3691873f3c542b5dddb16f364de7f765ee816576a23d6167a2e8a319e3a838305331dabec8f24ecd112a5f5359f  libtorrent-0.13.8.tar.lz
"
