summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2021-01-21 11:14:02 +0100
committerXiretza2021-01-21 11:14:02 +0100
commitaeb4e2adf7fdb7b597d976142b91191dfaa7ff16 (patch)
treee4c45c6c807608268ada1fee3b8bcb0cd69b1d9e
downloadaur-python-xc-fasm-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD47
2 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f77118eb22fc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = python-xc-fasm-git
+ pkgdesc = Library to convert FASM files to bitstream
+ pkgver = r72.e12f313
+ pkgrel = 1
+ url = https://github.com/SymbiFlow/xc-fasm
+ arch = any
+ license = ISC
+ checkdepends = python-pytest
+ makedepends = git
+ makedepends = python-setuptools
+ depends = python
+ depends = python-intervaltree
+ depends = python-simplejson
+ depends = python-textx
+ depends = python-prjxray
+ depends = python-fasm
+ provides = python-xc-fasm=r72.e12f313
+ conflicts = python-xc-fasm
+ source = git+https://github.com/SymbiFlow/xc-fasm.git
+ sha256sums = SKIP
+
+pkgname = python-xc-fasm-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d8e52f446e63
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: xiretza <xiretza+aur@xiretza.xyz>
+
+_pkgname=xc-fasm
+pkgname="python-$_pkgname-git"
+pkgver=r72.e12f313
+pkgrel=1
+pkgdesc="Library to convert FASM files to bitstream"
+arch=(any)
+url="https://github.com/SymbiFlow/xc-fasm"
+license=('ISC')
+depends=('python' 'python-intervaltree' 'python-simplejson' 'python-textx' 'python-prjxray' 'python-fasm')
+makedepends=('git' 'python-setuptools')
+checkdepends=('python-pytest')
+provides=("${pkgname%%-git}=$pkgver")
+conflicts=("${pkgname%%-git}")
+source=("git+$url.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$_pkgname"
+
+ python setup.py build
+}
+
+check() {
+ cd "$_pkgname"
+
+ # should really be fixed upstream
+ touch tests/__init__.py
+ # tests need to be updated to new prjxray-db layout
+ # pytest
+}
+
+package() {
+ cd "$_pkgname"
+
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+ # https://github.com/SymbiFlow/xc-fasm/issues/10
+ #install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}