summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMarkus Koch2024-04-20 10:09:13 +0200
committerMarkus Koch2024-04-20 10:09:13 +0200
commit166fc8a81028a858bca153144168ba472e28964f (patch)
treee9953ac5ed3bb93516119ddf150675981dd2c551 /PKGBUILD
downloadaur-166fc8a81028a858bca153144168ba472e28964f.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e88b53954432
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Markus Koch <markus@notsyncing.net>
+
+pkgname=python-glasgow-git
+pkgver=0.2038
+pkgrel=1
+pkgdesc="Software for the Glasgow Interface Explorer, the Scots Army Knife for electronics"
+arch=('any')
+url='https://github.com/GlasgowEmbedded/glasgow.git'
+license=('0BSD')
+depends=(python python-pyvcd python-libusb1 python-fx2 python-amaranth yosys nextpnr icestorm)
+makedepends=(python-build python-pdm)
+source=("git+https://github.com/GlasgowEmbedded/glasgow.git")
+sha256sums=('SKIP')
+provides=(python-glasgow)
+conflicts=(python-glasgow)
+
+pkgver() {
+ cd "$srcdir/glasgow"
+ #git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ git rev-list HEAD --count | sed "s/^/0./"
+}
+
+prepare() {
+ cd "$srcdir/glasgow"
+
+ git submodule update --init
+}
+
+build() {
+ cd "$srcdir/glasgow/software"
+
+ python -m build --wheel --no-isolation
+}
+
+package() {
+ cd "$srcdir/glasgow/software"
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm 644 $srcdir/glasgow/config/70-glasgow.rules $pkgdir/etc/udev/rules.d/70-glasgow.rules
+}