[arch-commits] Commit in (python-hidapi python-hidapi/trunk/PKGBUILD python2-hidapi)
Timothy Redaelli
tredaelli at archlinux.org
Tue Feb 14 15:44:30 UTC 2017
Date: Tuesday, February 14, 2017 @ 15:44:29
Author: tredaelli
Revision: 212435
Added:
python-hidapi/
Modified:
python-hidapi/trunk/PKGBUILD
Deleted:
python2-hidapi/
----------+
PKGBUILD | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)
Modified: python-hidapi/trunk/PKGBUILD
===================================================================
--- python2-hidapi/trunk/PKGBUILD 2017-02-14 15:44:25 UTC (rev 212433)
+++ python-hidapi/trunk/PKGBUILD 2017-02-14 15:44:29 UTC (rev 212435)
@@ -1,29 +1,48 @@
# $Id$
# Maintainer: Timothy Redaelli <timothy.redaelli at gmail.com>
# Contributor: Andy Weidenbaum <archbaum at gmail.com>
+# Contributor: Kevin Azzam <arch at kevin.azz.am>
-pkgname=python2-hidapi
-pkgver=0.7.99.19
+pkgbase=python-hidapi
+pkgname=('python-hidapi' 'python2-hidapi')
+_pipname=hidapi
+pkgver=0.7.99.20
_pkgver=${pkgver%.*}.post${pkgver##*.}
pkgrel=1
pkgdesc="A Cython interface to the hidapi from signal11/hidapi"
arch=('i686' 'x86_64')
-depends=('libusb' 'python2')
-makedepends=('cython2' 'python2-setuptools')
+makedepends=('cython2' 'python2-setuptools' 'cython' 'python-setuptools' 'libusb')
url="https://github.com/trezor/cython-hidapi"
license=('custom')
-source=(https://pypi.org/packages/source/h/${pkgname#python2-}/${pkgname#python2-}-$_pkgver.tar.gz)
-sha256sums=('890dea8bd8c4d35e1f1b29a9a3431aa1ee79ee1baf86cacb5913983a5bec5689')
+source=(https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$_pkgver.tar.gz)
+sha256sums=('5f88fd3e79deeeaacd2f266e641434a342d25b779778393191c863dd4f2dffcc')
+
+prepare() {
+ cp -R $_pipname-$_pkgver python2-$_pipname-$_pkgver
+}
+
build() {
- cd "${pkgname#python2-}-$_pkgver"
+ cd "$_pipname-$_pkgver"
+ python setup.py build
+ cd "../python2-$_pipname-$_pkgver"
python2 setup.py build
}
-package() {
- cd "${pkgname#python2-}-$_pkgver"
+package_python-hidapi() {
+ depends=('libusb' 'python')
+ cd $_pipname-$_pkgver
+ python setup.py install --root="$pkgdir/" --optimize=1
+
+ install -dm 755 "$pkgdir/usr/share/licenses/$pkgname"
+ echo "You are free to use cython-hidapi code for any purpose." > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-hidapi() {
+ depends=('libusb' 'python2')
+ cd "python2-$_pipname-$_pkgver"
python2 setup.py install --root="$pkgdir" --optimize=1
install -dm 755 "$pkgdir/usr/share/licenses/$pkgname"
More information about the arch-commits
mailing list