# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=btfs
pkgver=2.18
pkgrel=1
pkgdesc="Bittorrent filesystem based on FUSE"
url="https://github.com/johang/btfs"
arch="all"
license="GPL-3.0-or-later"
depends="python3"
makedepends="autoconf automake curl-dev fuse-dev libtorrent-rasterbar-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/johang/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	autoreconf -vfi
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man
	make -C src
}

check() {
	cd "$builddir/src"
	./btfs --help > /dev/null
}

package() {
	make DESTDIR="$pkgdir" -C "$builddir" install
}

sha512sums="d29f3816527c1eed105b45da559d025d61c8652144358227ed0ca3e516582cd8186fdcdf730b19fde6e7e9db1477690237444d2efe7c740f81f91032f1a12f86  btfs-2.18.tar.gz"
