blob: 7eea40c0d3abf69cace727c4220e3c5692576485 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=mitmproxy
pkgver=5.3.0
pkgrel=0
pkgdesc="Interactive TLS-capable intercepting HTTP proxy"
url="https://mitmproxy.org/"
license="MIT"
arch="noarch !s390x !armhf !mips64" # limited by py3-zstandard
depends="
python3
py3-setuptools
py3-asgiref
py3-blinker
py3-brotli
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
"
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
use-system-ca-certificates.patch"
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
# remove unneeded dependency on certifi
sed "/certifi/d" -i setup.py
}
build() {
python3 setup.py build
}
check() {
pytest --deselect "test/mitmproxy/test_version.py::test_get_version"
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
# remove deprecated tooling: https://github.com/mitmproxy/mitmproxy/pull/4296
rm "$pkgdir"/usr/bin/pathoc "$pkgdir"/usr/bin/pathod
rm -r "$pkgdir"/usr/lib/python3.*/site-packages/pathod
}
sha512sums="3f52f5285869de49c7c04ef9b6c0f3ef66689eb45fb6f9e971111049bf1aa0777e3e84b51f7031c1bdf105ce3f17fa4b03036d72617985b92996c6eea7566c38 mitmproxy-5.3.0.tar.gz
c8f19067394169c2e85f203351b8a4753bec3bc6498fc184fd4691e8a9f60a60de3c671285b36c6808e209d87254a329eff296efd12b79702153e029754e7c5c use-system-ca-certificates.patch"
|