summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkechiShiro2023-05-21 01:23:59 +0200
committerAkechiShiro2023-05-21 01:23:59 +0200
commit0cc91376a4b19bb8f65f6a1d2b69ec219b5df1b5 (patch)
treed907fcbc08a2aef76f64a00f0484cf232f8772d4
downloadaur-python-unblob-native-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD40
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9617587c17e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = python-unblob-native-git
+ pkgdesc = Performance critical parts of Unblob
+ pkgver = v0.1.1
+ pkgrel = 1
+ url = https://github.com/onekey-sec/unblob-native
+ arch = x86_64
+ license = MIT
+ checkdepends = python-pytest
+ checkdepends = python-pytest-cov
+ makedepends = git
+ makedepends = python-pip
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
+ makedepends = python-setuptools
+ makedepends = maturin
+ makedepends = python-maturin
+ depends = python
+ provides = python-unblob-native
+ source = git+https://github.com/onekey-sec/unblob-native
+ sha256sums = SKIP
+
+pkgname = python-unblob-native-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..75f778bd8d14
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: AkechiShiro <akechishiro-aur at lahfa dot xyz>
+
+_pyname=unblob-native
+pkgname=python-${_pyname}-git
+pkgver=v0.1.1
+pkgrel=1
+pkgdesc='Performance critical parts of Unblob'
+arch=('x86_64')
+url="https://github.com/onekey-sec/$_pyname"
+license=(MIT)
+depends=(python)
+conflicts=()
+provides=(python-unblob-native)
+makedepends=(git python-pip python-build python-installer python-wheel python-setuptools maturin python-maturin)
+checkdepends=(python-pytest python-pytest-cov)
+source=("git+https://github.com/onekey-sec/$_pyname")
+sha256sums=('SKIP')
+
+
+build() {
+ cd "$_pyname"
+ python -m build --wheel --no-isolation
+}
+
+package() {
+ cd "$_pyname"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+}
+
+check() {
+ cd "$_pyname"
+ local tmp=$(mktemp -d)
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ ls -lah *
+ python -m installer --destdir="$tmp" dist/${_pyname//-/_}-${pkgver:1}-cp*_$CARCH.whl
+ PYTHONPATH="$tmp$site_packages" python -m pytest tests
+
+ rmdir --ignore-fail-on-non-empty $tmp
+}
+