summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZacharias Knudsen2024-03-06 14:46:56 +0100
committerZacharias Knudsen2024-03-06 14:47:14 +0100
commite230a6b46c7504360c9c491ee330dbc02173e2e8 (patch)
tree2970d02419126066665015946b130ad9182f53a3
downloadaur-e230a6b46c7504360c9c491ee330dbc02173e2e8.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD42
-rw-r--r--puma-dev-git.install3
-rw-r--r--puma-dev@.service11
5 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..faeffff0f774
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = puma-dev-git
+ pkgdesc = A tool to manage rack apps in development with puma
+ pkgver = v0.18.3.r0.gdb9ec15
+ pkgrel = 1
+ url = https://github.com/puma/puma-dev
+ install = puma-dev-git.install
+ arch = x86_64
+ license = BSD-3-Clause
+ makedepends = go
+ provides = puma-dev
+ source = puma-dev-git::git+https://github.com/puma/puma-dev
+ source = puma-dev@.service
+ md5sums = SKIP
+ md5sums = a080c67779718704cb55aa1aaf6eb3ef
+
+pkgname = puma-dev-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..91690dffb556
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!puma-dev-git.install
+!puma-dev@.service \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ef93ef53d59b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Zacharias Knudsen <z@chari.as>
+pkgname=puma-dev-git
+pkgver=v0.18.3.r0.gdb9ec15
+pkgrel=1
+pkgdesc="A tool to manage rack apps in development with puma "
+arch=('x86_64')
+url="https://github.com/puma/puma-dev"
+license=('BSD-3-Clause')
+makedepends=('go')
+provides=('puma-dev')
+install=puma-dev-git.install
+source=("$pkgname::git+$url"
+ 'puma-dev@.service')
+md5sums=('SKIP'
+ 'a080c67779718704cb55aa1aaf6eb3ef')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare(){
+ cd "$pkgname"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build ./cmd/...
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm755 build/puma-dev "$pkgdir"/usr/bin/puma-dev
+
+ install -Dm644 "$srcdir"/puma-dev@.service "$pkgdir"/usr/lib/systemd/system/puma-dev@.service
+}
diff --git a/puma-dev-git.install b/puma-dev-git.install
new file mode 100644
index 000000000000..54ba1f2fe1b2
--- /dev/null
+++ b/puma-dev-git.install
@@ -0,0 +1,3 @@
+post_install() {
+ printf "To enable puma-dev, use systemctl enable --now puma-dev@USER\n"
+}
diff --git a/puma-dev@.service b/puma-dev@.service
new file mode 100644
index 000000000000..5a06e2fcb8ef
--- /dev/null
+++ b/puma-dev@.service
@@ -0,0 +1,11 @@
+[Unit]
+After=network.target
+
+[Service]
+User=%i
+ExecStart=/usr/bin/puma-dev -sysbind
+Restart=on-failure
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file