2022-11-24 23:55:44 +01:00

88 lines
2.3 KiB
Plaintext

# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=mitmproxy
pkgver=8.1.1
pkgrel=1
pkgdesc="Interactive TLS-capable intercepting HTTP proxy"
url="https://mitmproxy.org/"
license="MIT"
arch="noarch !s390x !armhf" # limited by py3-zstandard
depends="
python3
py3-asgiref
py3-blinker
py3-brotli
py3-certifi
py3-click
py3-cryptography
py3-flask
py3-h2
py3-hyperframe
py3-kaitaistruct
py3-ldap3
py3-msgpack
py3-passlib
py3-protobuf
py3-asn1
py3-openssl
py3-parsing
py3-pyperclip
py3-ruamel.yaml
py3-sortedcontainers
py3-tornado
py3-urwid
py3-wsproto
py3-publicsuffix2
py3-zstandard
"
makedepends="py3-setuptools"
checkdepends="
py3-hypothesis
py3-parver
py3-pytest
py3-pytest-asyncio
py3-requests
"
source="$pkgname-$pkgver.tar.gz::https://github.com/mitmproxy/mitmproxy/archive/v$pkgver.tar.gz
skip-test-optmanager-x86.patch
intlimit.patch
py311.patch
"
options="!check" # errors with new flask
# secfixes:
# 7.0.3-r0:
# - CVE-2021-39214
prepare() {
default_prepare
# remove test file importing asynctest module, which doesn't support python3.8
# see: https://github.com/Martiusweb/asynctest/issues/132
rm test/mitmproxy/addons/test_readfile.py
# relax constraints on required dependencies
sed -E "s/, *<[0-9=.]*//" -i setup.py
}
build() {
python3 setup.py build
}
check() {
pytest \
--deselect "test/mitmproxy/test_version.py::test_get_version" \
--deselect "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_get_cert"
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}
sha512sums="
a62a45f8991819202115ab8f43d1c113df88504c494c73917ec2e3c52999dbe3ac596444a4c096619d4285f2e26a91ec715d6894fc4d7768bac1a2c3c4c268bc mitmproxy-8.1.1.tar.gz
30d677fe7899394e096d20f16d5522dc962518bebf4e23eaa954507a2dd99af61e568e6515363c74fd606d43cce21bc4c3272c6f08d2cf97d88981449cf9d1a2 skip-test-optmanager-x86.patch
e88ad8951de8f7bd967946b7fc27e5782b4ae5621acc57d140dfcc3b76a669719512978c1833fbbf9e5427afaf0cb4b888109cabf3c43e14d12e8ab86f672840 intlimit.patch
820efc5e00faeb8578ab44e8959bb6f23e59f536b9a24d26f8745ea1317bc2f99ed5370e47a12cbabb750d2ca0180893a18591a036ef6643436e229bcf20ccd1 py311.patch
"