summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Hill2023-11-18 17:49:25 -0800
committerBrandon Hill2023-11-20 14:48:49 -0800
commit344d699677e217bb4adc2e151ef7a4da60e617a0 (patch)
tree0e8ab55650454c1a3c83031b425ad1ded312bb77
downloadaur-344d699677e217bb4adc2e151ef7a4da60e617a0.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD50
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f441155b67a7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = stable-diffusion-web-ui-git
+ pkgdesc = Stable Diffusion Web UI (AUTOMATIC1111)
+ pkgver = v1.6.0.r2.4afaaf8a
+ pkgrel = 1
+ url = https://github.com/AUTOMATIC1111/stable-diffusion-webui
+ arch = x86_64
+ license = AGPL3
+ makedepends = git
+ depends = python
+ depends = curl
+ depends = grep
+ provides = stable-diffusion-ui
+ source = stable-diffusion-web-ui-git::git+https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
+ md5sums = SKIP
+
+pkgname = stable-diffusion-web-ui-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..2c972c2905b5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+stable-diffusion-web-ui-git
+*.pkg.tar.zst \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..552cbc927ee6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Brandon Hill <brandon@mejino.family>
+
+_appname='stable-diffusion-web-ui'
+_apphome="/opt/$_appname"
+
+_binname="$_appname-server"
+_bindir="/usr/bin"
+
+pkgname="${_appname}-git"
+pkgver=v1.6.0.r2.4afaaf8a
+pkgrel=1
+pkgdesc="Stable Diffusion Web UI (AUTOMATIC1111)"
+arch=('x86_64')
+url="https://github.com/AUTOMATIC1111/stable-diffusion-webui"
+license=('AGPL3')
+groups=()
+depends=('python' 'curl' 'grep')
+makedepends=('git')
+provides=("stable-diffusion-ui")
+source=("${pkgname}::git+https://github.com/AUTOMATIC1111/stable-diffusion-webui.git")
+noextract=()
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname}"
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+build() {
+ cd "$srcdir/${pkgname}"
+
+ # Generate passthrough shell script to run the provided webui.sh script
+ cat > $_binname <<!
+#!/bin/bash
+# Start Server
+cd "$_apphome" && ./webui.sh
+!
+}
+
+package() {
+ cd "$srcdir/${pkgname}"
+
+ # Install passthrough script
+ install -Dm755 ./$_binname "$pkgdir/$_bindir/$_binname"
+
+ # Copy source to app's home directory
+ mkdir -p "$pkgdir/opt/"
+ cp -r . "$pkgdir/$_apphome"
+ chmod 777 -R "$pkgdir/$_apphome"
+}