summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Maslowski2020-06-18 23:51:44 +0200
committerDaniel Maslowski2020-10-11 01:49:06 +0200
commite5361f8d1506981510c3f011b2413fa9f431ec6a (patch)
tree5a1294fabce4ebff5936864631ea6cb12933d2d8
parentd05ff98261de1eb40d95274a9b13bc5de5d93be6 (diff)
downloadaur-e5361f8d1506981510c3f011b2413fa9f431ec6a.tar.gz
fix PKGBUILD
- add pkgver - add git to makepends - fix setup.py
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6a4463fdd97..a566c5b389b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = python-pslab-git
pkgdesc = Core library for PSlab desktop
- pkgver = 1.0.2
+ pkgver = v1.0.1.r95.g57425d0
pkgrel = 1
url = https://pslab.io
arch = any
license = GPL3
+ makedepends = git
depends = python
depends = python-setuptools
depends = python-pyserial
diff --git a/PKGBUILD b/PKGBUILD
index 9aee7309a3f..ec27b56abae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pyname=pslab-python
pkgname=python-pslab-git
-pkgver=1.0.2
+pkgver=v1.0.1.r95.g57425d0
pkgrel=1
pkgdesc="Core library for PSlab desktop"
arch=('any')
@@ -14,16 +14,22 @@ depends=(
'python-pyserial'
'python-numpy'
)
+makedepends=('git')
provides=("$_pyname")
conflicts=(python-pslab)
options=(!emptydirs)
source=(git://github.com/fossasia/$_pyname.git)
sha512sums=('SKIP')
+pkgver() {
+ cd "$srcdir/${_pyname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
package() {
cd "$srcdir/${_pyname}"
# strip out attempt to install udev rules
- sed -i "s/.*cmdclass.*/)/" setup.py
+ sed -i "/pslab.rules/d" setup.py
python setup.py install --root="$pkgdir/" --optimize=1
install -Dm 644 99-pslab.rules "$pkgdir/usr/lib/udev/rules.d/99-pslab.rules"
}