summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Matias2023-04-09 15:46:48 -0300
committerPaulo Matias2023-04-09 15:46:48 -0300
commitef46e12d76431b7fd5fd4b7f7fdda65f56eae143 (patch)
tree9e6b19cdcd86a35ca05b932daf7e497cf3353541
downloadaur-ef46e12d76431b7fd5fd4b7f7fdda65f56eae143.tar.gz
initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD29
2 files changed, 42 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4c4dd911e782
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = netlistsvg-git
+ pkgdesc = draws an SVG schematic from a yosys JSON netlist
+ pkgver = 1.0.2.r9.g1e187a7
+ pkgrel = 1
+ url = https://github.com/nturley/netlistsvg
+ arch = any
+ license = MIT
+ depends = nodejs
+ depends = npm
+ source = git+https://github.com/nturley/netlistsvg.git
+ md5sums = SKIP
+
+pkgname = netlistsvg-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e035da55ad7b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Paulo Matias <matias ufscar br>
+pkgname=netlistsvg-git
+pkgver=1.0.2.r9.g1e187a7
+pkgrel=1
+pkgdesc="draws an SVG schematic from a yosys JSON netlist"
+url="https://github.com/nturley/netlistsvg"
+arch=(any)
+license=(MIT)
+depends=(nodejs npm)
+source=(git+https://github.com/nturley/netlistsvg.git)
+md5sums=(SKIP)
+
+pkgver() {
+ cd "$srcdir/netlistsvg"
+ git describe --tags --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+package() {
+ cd "$srcdir/netlistsvg"
+ npm install -g --prefix "${pkgdir}/usr" git+file://"$(pwd)"
+
+ # Non-deterministic race in npm gives 777 permissions to random directories.
+ # See https://github.com/npm/cli/issues/1103 for details.
+ find "${pkgdir}/usr" -type d -exec chmod 755 {} +
+
+ # npm gives ownership of ALL FILES to build user
+ # https://bugs.archlinux.org/task/63396
+ chown -R root:root "${pkgdir}"
+}