diff options
author | Ben Westover | 2022-06-06 17:12:18 -0400 |
---|---|---|
committer | Ben Westover | 2022-06-06 17:12:18 -0400 |
commit | e5e9bcbc74db79eb74940f242939fbe060a4ba39 (patch) | |
tree | 9e2072f6908f0b1091e96451aee50f176c6bdb5d | |
download | aur-e5e9bcbc74db79eb74940f242939fbe060a4ba39.tar.gz |
addpkg: mtkclient
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | usb.patch | 23 |
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8c64ef4e7937 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = mtkclient + pkgdesc = Unofficial MTK reverse engineering and flash tool + pkgver = 1.52 + pkgrel = 1 + url = https://github.com/bkerler/mtkclient + arch = any + license = GPL + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + makedepends = python-setuptools + depends = python + depends = python-pyusb + depends = python-pycryptodome + depends = python-colorama + source = https://github.com/bkerler/mtkclient/archive/refs/tags/1.52.tar.gz + source = usb.patch + sha256sums = 5a9363cdcb65392ed4dd19f8442d73f0560d2195b67e790abcee7d7ea34e9ff2 + sha256sums = 0ed1a391ae22bc5bed99ecd922d70b37ed4a9658613eb16831b0573d2c77b5ef + +pkgname = mtkclient diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9224aee49408 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,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 +} diff --git a/usb.patch b/usb.patch new file mode 100644 index 000000000000..145c6c764b53 --- /dev/null +++ b/usb.patch @@ -0,0 +1,23 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 348cdce..36d4168 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -4,7 +4,6 @@ requires = [ + "wheel", + "pyusb", + "pycryptodome", +- "colorama", +- "usb" ++ "colorama" + ] + build-backend = "setuptools.build_meta" +diff --git a/requirements.txt b/requirements.txt +index 946fe9a..cde3398 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -2,5 +2,3 @@ wheel + pyusb + pycryptodome + colorama +-usb +- |