diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-05 05:40:08 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-05 05:48:04 -0300 |
commit | c676680b0a2b82dc7f8f6f07b23fcd6d249ccd80 (patch) | |
tree | 582e170c8bb984073074ad4a2e60fa6fc814e7ba | |
parent | b62268fb4fc25f656c1f6abd0db73e67bc1fb9c7 (diff) | |
download | aports-c676680b0a2b82dc7f8f6f07b23fcd6d249ccd80.tar.bz2 aports-c676680b0a2b82dc7f8f6f07b23fcd6d249ccd80.tar.xz |
testing/py3-wifi: upgrade to 0.3.8
-rw-r--r-- | testing/py3-wifi/APKBUILD | 46 | ||||
-rw-r--r-- | testing/py3-wifi/fix-iwlist-path.patch | 14 |
2 files changed, 33 insertions, 27 deletions
diff --git a/testing/py3-wifi/APKBUILD b/testing/py3-wifi/APKBUILD index 5dffa5ebec..76a42cdc45 100644 --- a/testing/py3-wifi/APKBUILD +++ b/testing/py3-wifi/APKBUILD @@ -1,41 +1,33 @@ # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> -pkgname=py-wifi +pkgname=py3-wifi _pkgname=wifi -pkgver=0.2.0 +pkgver=0.3.8 pkgrel=0 pkgdesc="Command line tool and library wrappers for network interfaces" -url="https://pypi.python.org/pypi/wifi" +options="!check" # Tests only on GitHub tarball that are on 0.3.5 +url="https://github.com/rockymeza/wifi" arch="noarch" -license="BSD" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +license="BSD-3-Clause" +depends="python3 py3-pbkdf2 py3-setuptools wireless-tools" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + fix-iwlist-path.patch + " +builddir="$srcdir"/$_pkgname-$pkgver -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +replaces="py-wifi" # Backwards compatibility +provides="py-wifi=$pkgver-r$pkgrel" # Backwards compatibility build() { - cd "$_builddir" - python2 setup.py build || return 1 + python3 setup.py build } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + python3 setup.py install --prefix=/usr --root="$pkgdir" + + # Avoid conflict with tlp + mv "$pkgdir"/usr/bin/wifi "$pkgdir"/usr/bin/pywifi } -md5sums="7df58691eb39be009e78e0c96b2c5598 wifi-0.2.0.tar.gz" -sha256sums="d7c482e7ef93cc6ccce312ece095866242038401fb1b717717369f384c6aa1e0 wifi-0.2.0.tar.gz" -sha512sums="916144686e8cb4338a1f9e0c17375a6258ebc8c1a553911c50ec69c9ba1b465d2f6aac9aced4e4fabf16a08e7c6729af159de4c5e0783e4967cdff17ad01824f wifi-0.2.0.tar.gz" +sha512sums="649b9ca85fababa8275b4c03ce229d474da8a89c19e1467b9e3a5a7be2e2a975c142a7851226c3285d3d071ee1688adafbe835efd4f9bcd2295309b9e039da81 wifi-0.3.8.tar.gz +7b9d85eb9ac499319bb51d34ed44c6c2fe2431eb0fbf4e83fd30c3805181f90a9fc22fb24d7361c31ad140cf73e62352e28276210fc7d9f85a6331f5eeb0513f fix-iwlist-path.patch" diff --git a/testing/py3-wifi/fix-iwlist-path.patch b/testing/py3-wifi/fix-iwlist-path.patch new file mode 100644 index 0000000000..dfdc602dde --- /dev/null +++ b/testing/py3-wifi/fix-iwlist-path.patch @@ -0,0 +1,14 @@ +diff --git a/wifi/scan.py b/wifi/scan.py +index 29f61ad..43f0af7 100644 +--- a/wifi/scan.py ++++ b/wifi/scan.py +@@ -35,7 +35,7 @@ class Cell(object): + Returns a list of all cells extracted from the output of iwlist. + """ + try: +- iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'], ++ iwlist_scan = subprocess.check_output(['/usr/sbin/iwlist', interface, 'scan'], + stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + raise InterfaceError(e.output.strip()) + |