summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas2017-12-23 01:27:04 +0100
committerNiklas2017-12-23 01:27:04 +0100
commit507751cdc5b58809fff5d54a506f8cc19f91a3e1 (patch)
tree3c13b7be6a6655638ba5015a735251e94cefa2f5
downloadaur-507751cdc5b58809fff5d54a506f8cc19f91a3e1.tar.gz
initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD44
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0c93aceeb6d9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = python-adb
+ pkgdesc = A pure Python implementation of the Android ADB and Fastboot protocols
+ pkgver = 1.2.0
+ pkgrel = 2
+ url = https://github.com/google/python-adb
+ arch = any
+ license = Apache
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ source = https://files.pythonhosted.org/packages/source/a/adb/adb-1.2.0.tar.gz
+ sha512sums = 2bb02adbd43602471a48f8de92fd660835b9f0dfc41df30ebdbf6408f410ff56fc7e073b0e636ac1f1ed44aa98719e10ed64f646f5e5477d321a676c7f2f1708
+
+pkgname = python-adb
+ depends = python-libusb1
+ depends = python-rsa
+ optdepends = python-progressbar: progressbar for Fastboot
+
+pkgname = python2-adb
+ depends = python2-libusb1
+ depends = python2-m2crypto
+ optdepends = python2-progressbar: progressbar for Fastboot
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aa86f56ee984
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Niklas <dev@n1klas.net>
+
+pkgbase=python-adb
+pkgname=(python-adb python2-adb)
+_name=adb
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="A pure Python implementation of the Android ADB and Fastboot protocols"
+arch=('any')
+url="https://github.com/google/python-adb"
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha512sums=('2bb02adbd43602471a48f8de92fd660835b9f0dfc41df30ebdbf6408f410ff56fc7e073b0e636ac1f1ed44aa98719e10ed64f646f5e5477d321a676c7f2f1708')
+
+prepare() {
+ cd "${srcdir}"
+ cp -a ${_name}-${pkgver}{,-python2}
+ find "${_name}-${pkgver}-python2" -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
+}
+
+build() {
+ cd "${srcdir}/${_name}-${pkgver}"
+ python setup.py build
+
+ cd "${srcdir}/${_name}-${pkgver}-python2"
+ python2 setup.py build
+}
+
+package_python-adb() {
+ depends=('python-libusb1' 'python-rsa')
+ optdepends=('python-progressbar: progressbar for Fastboot')
+
+ cd "${srcdir}/${_name}-${pkgver}"
+ python setup.py install --skip-build --root="${pkgdir}" --optimize=1
+}
+
+package_python2-adb() {
+ depends=('python2-libusb1' 'python2-m2crypto')
+ optdepends=('python2-progressbar: progressbar for Fastboot')
+
+ cd "${srcdir}/${_name}-${pkgver}-python2"
+ python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
+}