diff options
author | Ben Westover | 2023-10-24 13:18:40 -0400 |
---|---|---|
committer | Ben Westover | 2023-10-24 13:18:40 -0400 |
commit | fdfb5ca2a8ad809c3660eb190ec0522ab76cdd3d (patch) | |
tree | cce7f8b92c8f9cb1a74a514404ed13b16069f4bd | |
parent | f7d33cf39a2e0889ebaf0f3733d2b44a6cbad8e2 (diff) | |
download | aur-fdfb5ca2a8ad809c3660eb190ec0522ab76cdd3d.tar.gz |
Many fixes
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | mtkclient.install | 3 | ||||
-rw-r--r-- | scripts-and-data-files.patch | 14 | ||||
-rw-r--r-- | udev.patch | 25 | ||||
-rw-r--r-- | usb.patch | 24 |
6 files changed, 61 insertions, 40 deletions
@@ -1,11 +1,10 @@ pkgbase = mtkclient-git pkgdesc = Unofficial MTK reverse engineering and flash tool - pkgver = 1.63.r6.g054dafa + pkgver = 1.63.r38.gb63c933 pkgrel = 1 url = https://github.com/bkerler/mtkclient - install = mtkclient.install arch = any - license = GPL + license = GPL3 makedepends = git makedepends = python-build makedepends = python-installer @@ -16,6 +15,7 @@ pkgbase = mtkclient-git depends = python-pyusb depends = python-pyserial depends = python-pycryptodome + depends = python-pycryptodomex depends = python-colorama depends = python-mock depends = shiboken6 @@ -23,8 +23,10 @@ pkgbase = mtkclient-git provides = mtkclient conflicts = mtkclient source = git+https://github.com/bkerler/mtkclient.git - source = usb.patch + source = scripts-and-data-files.patch + source = udev.patch sha256sums = SKIP - sha256sums = 953b4111910056208b032573b0c34d886490efda06ada46f9718a70d15f891d2 + sha256sums = d156e692d36fb48f9d385598a2b888ddf3bf0fea182cf9757a71c971c144f710 + sha256sums = d4b6d7967324e585f69c51257e4293f390291a9534e697eefc94568d169220bc pkgname = mtkclient-git @@ -1,21 +1,22 @@ # Maintainer: Ben Westover <kwestover.kw@gmail.com> pkgname=mtkclient-git -pkgver=1.63.r6.g054dafa +pkgver=1.63.r38.gb63c933 pkgrel=1 pkgdesc="Unofficial MTK reverse engineering and flash tool" arch=('any') url="https://github.com/bkerler/mtkclient" -license=('GPL') -depends=('libusb' 'python' 'python-pyusb' 'python-pyserial' 'python-pycryptodome' 'python-colorama' 'python-mock' 'shiboken6' 'pyside6') +license=('GPL3') +depends=('libusb' 'python' 'python-pyusb' 'python-pyserial' 'python-pycryptodome' 'python-pycryptodomex' 'python-colorama' 'python-mock' 'shiboken6' 'pyside6') makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools') conflicts=('mtkclient') provides=('mtkclient') -install=mtkclient.install source=("git+https://github.com/bkerler/mtkclient.git" - "usb.patch") + "scripts-and-data-files.patch" + "udev.patch") sha256sums=('SKIP' - '953b4111910056208b032573b0c34d886490efda06ada46f9718a70d15f891d2') + 'd156e692d36fb48f9d385598a2b888ddf3bf0fea182cf9757a71c971c144f710' + 'd4b6d7967324e585f69c51257e4293f390291a9534e697eefc94568d169220bc') pkgver() { cd mtkclient @@ -24,8 +25,13 @@ pkgver() { prepare() { cd mtkclient - # Remove problematic "usb" dependency (package already depends on pyusb) - cat ../usb.patch | patch -p1 + + # Prevent LICENSE and README.md from being installed directly into /usr. + # Also add mtk_gui to list of scripts to be insalled into /usr/bin. + cat ../scripts-and-data-files.patch | patch -p1 + + # Replace plugdev with uaccess and adbusers like upstream android-udev + cat ../udev.patch | patch -p1 } build() { @@ -36,4 +42,5 @@ build() { package() { cd mtkclient python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 Setup/Linux/51-edl.rules "$pkgdir/usr/lib/udev/rules.d/52-mtk-edl.rules" } diff --git a/mtkclient.install b/mtkclient.install deleted file mode 100644 index 3a302d07ff7c..000000000000 --- a/mtkclient.install +++ /dev/null @@ -1,3 +0,0 @@ -post_install() { - echo -e "\033[1;32m==>\033[0m \033[1mInstall the correct udev rules with the instructions at \e[4mhttps://github.com/bkerler/mtkclient#install-rules" -} diff --git a/scripts-and-data-files.patch b/scripts-and-data-files.patch new file mode 100644 index 000000000000..c0f6cc8b6459 --- /dev/null +++ b/scripts-and-data-files.patch @@ -0,0 +1,14 @@ +diff --git a/setup.py b/setup.py +index 1ab2d68..fdfc2e5 100755 +--- a/setup.py ++++ b/setup.py +@@ -4,8 +4,7 @@ from setuptools import setup, find_packages + setup( + packages=find_packages(), + long_description=open("README.md").read(), +- scripts=['mtk','stage2'], +- data_files = ['LICENSE','README.md'], ++ scripts=['mtk','stage2', 'mtk_gui'], + long_description_content_type="text/markdown", + url='https://github.com/bkerler/mtkclient', + project_urls={ diff --git a/udev.patch b/udev.patch new file mode 100644 index 000000000000..dce3a2cf9da6 --- /dev/null +++ b/udev.patch @@ -0,0 +1,25 @@ +diff --git a/Setup/Linux/51-edl.rules b/Setup/Linux/51-edl.rules +index 95e5594..ee2f384 100755 +--- a/Setup/Linux/51-edl.rules ++++ b/Setup/Linux/51-edl.rules +@@ -1,15 +1,15 @@ + + # Qualcomm EDL +-SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0660", GROUP="adbusers", TAG+="uaccess" + + # Qualcomm Memory Debug +-SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9006", MODE="0666", GROUP="plugdev" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9006", MODE="0660", GROUP="adbusers", TAG+="uaccess" + + # Qualcomm Memory Debug +-SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="900E", MODE="0666", GROUP="plugdev" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="900E", MODE="0660", GROUP="adbusers", TAG+="uaccess" + + # LG Memory Debug +-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1004", ATTRS{idProduct}=="61a1", MODE="0666", GROUP="plugdev" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="1004", ATTRS{idProduct}=="61a1", MODE="0660", GROUP="adbusers", TAG+="uaccess" + + # Sierra Wireless +-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", MODE="0666", GROUP="plugdev" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", MODE="0660", GROUP="adbusers", TAG+="uaccess" diff --git a/usb.patch b/usb.patch deleted file mode 100644 index 3a84ff40a487..000000000000 --- a/usb.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index 9a0199a..a2e0af9 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -5,7 +5,6 @@ requires = [ - "pyusb", - "pycryptodome", - "colorama", -- "usb", - "shiboken6", - "pyside6", - "mock" -diff --git a/requirements.txt b/requirements.txt -index 4e111b5..bff165c 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -3,7 +3,6 @@ pyusb >= 1.2.1 - pycryptodome >= 3.15.0 - pycryptodomex - colorama >= 0.4.4 --usb >= 0.0.83.dev0 - shiboken6 >= 6.4.0.1 - pyside6 >= 6.4.0.1 - mock >= 4.0.3 |