# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=libtorrent
pkgver=0.14.0
pkgrel=0
pkgdesc="BitTorrent library written in C++"
url="https://rakshasa.github.io/rtorrent"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	autoconf
	automake
	libsigc++3-dev
	libtool
	linux-headers
	openssl-dev>3
	zlib-dev
	"
subpackages="$pkgname-dev"
source="https://github.com/rakshasa/libtorrent/archive/v$pkgver/libtorrent-$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -iv
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-debug \
		--disable-instrumentation
	make
}

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

sha512sums="
124efde251e335ae0fc2f8cd9dff9f918ae9f818d17bc823b08826da534103e8e74dec37ee03a0b9c9c0a7bb1039958638dab08d17e83593b718b07aecad5001  libtorrent-0.14.0.tar.gz
"
