# Template file for 'mitmproxy'
pkgname=mitmproxy
version=11.1.3
revision=2
build_style=python3-pep517
hostmakedepends="python3-setuptools"
depends="python3-aioquic python3-Brotli python3-Flask python3-argon2 python3-asgiref
 python3-certifi python3-cryptography python3-h11 python3-h2 python3-hyperframe
 python3-kaitaistruct python3-ldap3 python3-mitmproxy-rs python3-msgpack python3-openssl
 python3-parsing python3-passlib python3-publicsuffix2 python3-pyperclip python3-ruamel.yaml
 python3-sortedcontainers python3-tornado python3-urwid python3-wsproto python3-zstandard"
checkdepends="${depends} python3-hypothesis python3-parver
 python3-pytest-asyncio python3-pytest-cov python3-pytest-timeout python3-requests"
short_desc="Interactive TLS-capable intercepting HTTP proxy"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://mitmproxy.org"
changelog="https://raw.githubusercontent.com/mitmproxy/mitmproxy/main/CHANGELOG.md"
distfiles="https://github.com/mitmproxy/mitmproxy/archive/refs/tags/v${version}.tar.gz"
checksum=bb4f6fc8e9ac64b4c725811983e3e3ff6b2b18b2a992d80d816811709e9efde5

_skip="(test_get_version)" # This test fails without a git repository
_skip+="or(test_wireguard)" # Tries to execute a helper binary compiled for glibc

if [ "${XBPS_TARGET_MACHINE%-musl}" = 'i686' ]; then
	_skip+="or(test_refresh)"
fi

if [ "${XBPS_BUILD_ENVIRONMENT}" = 'void-packages-ci' ]; then
	_skip+="or(test_tun_mode)"
fi

make_check_args="-k not($_skip)"

post_install() {
	vlicense LICENSE
}
