summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAkechiShiro2023-05-20 18:52:25 +0200
committerAkechiShiro2023-05-20 18:52:25 +0200
commita68bb77c7b78b3f326e890946963159d0137ff5b (patch)
tree89ca6e820b501f83523dd2f5ff50db57ff8b2f2c /PKGBUILD
downloadaur-a68bb77c7b78b3f326e890946963159d0137ff5b.tar.gz
Initial commit for deps of unblob-git
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ffa97078a729
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: AkechiShiro <akechishiro-aur at lahfa dot xyz>
+
+_pyname=ubi_reader
+pkgname=python-${_pyname}-git
+pkgver=v0.8.6.r2.gdc9075c
+pkgrel=1
+pkgdesc='Python bindings for the LZO data compression library'
+arch=('any')
+url="https://github.com/onekey-sec/$_pyname"
+license=(GPL)
+depends=(python)
+conflicts=()
+provides=(ubi_reader)
+makedepends=(git python-pip python-build python-installer python-wheel python-setuptools python-poetry python-pytest python-pytest-cov)
+checkdepends=()
+source=("git+https://github.com/onekey-sec/$_pyname")
+sha256sums=(SKIP)
+
+pkgver() {
+ cd "$_pyname"
+ git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ git -C "${srcdir}/${_pyname}" clean -dfx
+}
+
+build() {
+ cd "$_pyname"
+ python -m build --wheel --no-isolation
+}
+
+# Not working, tests should be made post_install I believe
+#check(){
+# cd "$srcdir/$_pyname"
+# # For pytest
+# pytest
+#}
+
+package() {
+ cd "$_pyname"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+}