summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9224aee49408359e55be93d1723401c9810257be (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
# Maintainer: Ben Westover <kwestover.kw@gmail.com>

pkgname=mtkclient
pkgver=1.52
pkgrel=1
pkgdesc="Unofficial MTK reverse engineering and flash tool"
arch=('any')
url="https://github.com/bkerler/mtkclient"
license=('GPL')
depends=('python' 'python-pyusb' 'python-pycryptodome' 'python-colorama')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=("https://github.com/bkerler/mtkclient/archive/refs/tags/$pkgver.tar.gz"
        "usb.patch")
sha256sums=('5a9363cdcb65392ed4dd19f8442d73f0560d2195b67e790abcee7d7ea34e9ff2'
            '0ed1a391ae22bc5bed99ecd922d70b37ed4a9658613eb16831b0573d2c77b5ef')

prepare() {
	cd mtkclient-$pkgver
	# Remove problematic "usb" dependency (package already depends on pyusb)
	cat ../usb.patch | patch -p1
}

build() {
	cd mtkclient-$pkgver
	python -m build --wheel --no-isolation
}

package() {
	cd mtkclient-$pkgver
	python -m installer --destdir="$pkgdir" dist/*.whl
}