summaryrefslogtreecommitdiff
path: root/opt/fcgiwrap
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /opt/fcgiwrap
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'opt/fcgiwrap')
-rw-r--r--opt/fcgiwrap/.footprint19
-rw-r--r--opt/fcgiwrap/.signature6
-rw-r--r--opt/fcgiwrap/MAKEPKG84
3 files changed, 109 insertions, 0 deletions
diff --git a/opt/fcgiwrap/.footprint b/opt/fcgiwrap/.footprint
new file mode 100644
index 0000000..e3b5623
--- /dev/null
+++ b/opt/fcgiwrap/.footprint
@@ -0,0 +1,19 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/sv/
+drwxr-xr-x root/root etc/sv/fcgiwrap/
+-rwxr-xr-x root/root etc/sv/fcgiwrap/finish
+-rwxr-xr-x root/root etc/sv/fcgiwrap/run
+drwxr-xr-x root/root etc/sv/fcgiwrap/log/
+-rwxr-xr-x root/root etc/sv/fcgiwrap/log/run
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/sbin/
+-rwxr-xr-x root/root usr/sbin/fcgiwrap
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man8/
+-rw-r--r-- root/root usr/share/man/man8/fcgiwrap.8.gz
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/lib/
+drwxr-xr-x root/root var/lib/pkg/
+drwxr-xr-x root/root var/lib/pkg/meta/
+-rw-r--r-- root/root var/lib/pkg/meta/fcgiwrap
diff --git a/opt/fcgiwrap/.signature b/opt/fcgiwrap/.signature
new file mode 100644
index 0000000..d23b9c7
--- /dev/null
+++ b/opt/fcgiwrap/.signature
@@ -0,0 +1,6 @@
+RWTZ9IduCSQ/mPb2tjKHUU27Au0Zj0oWYqxEYmAA5iNe+UlwXMMgDLrr574+Ng6eiFSrD5b0KiMj8+gye/JSzoCvqYQ9XozKOgg=
+
+SHA256 (MAKEPKG) = 3e3f1f5d9784dac9b82ef3d8bff665b8ed9b40269f6c2875eedcecde31150cf8
+SHA256 (.footprint) = 1a3f9bb53f43ed31300bb4f03d86c5b790a17eb36cef2eca33102c6661308e18
+SHA256 (1.1.0.tar.gz) = 4c7de0db2634c38297d5fcef61ab4a3e21856dd7247d49c33d9b19542bd1c61f
+SHA256 (fcgiwrap#1.1.0-1.pkg.tar.gz) = 03c8c56e3710ebf754a61a12d12570cf9c4567fff2c294c689b7ba23d20d8295
diff --git a/opt/fcgiwrap/MAKEPKG b/opt/fcgiwrap/MAKEPKG
new file mode 100644
index 0000000..0a56948
--- /dev/null
+++ b/opt/fcgiwrap/MAKEPKG
@@ -0,0 +1,84 @@
+#!/bin/mkpkg
+# description: Simple FastCGI wrapper for CGI scripts
+# url: https://github.com/gnosek/fcgiwrap
+
+name=fcgiwrap
+version=1.1.0
+release=1
+depends=(fcgi2)
+makedeps=(autoconf automake libtool m4)
+groups=(fcgiwrap:user:fcgiwrap:/var/run/fcgiwrap:755)
+services=(fcgiwrap)
+source=(https://github.com/gnosek/fcgiwrap/archive/refs/tags/$version.tar.gz)
+sha256sums=(
+ "4c7de0db2634c38297d5fcef61ab4a3e21856dd7247d49c33d9b19542bd1c61f"
+)
+
+build() {
+ cd $name-$version
+
+ autoreconf -i
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/share/man
+
+ make
+ make DESTDIR=$PKG install
+
+ # rawnix uses unified /usr/bin
+ # install -d $PKG/usr/bin
+ # mv $PKG/usr/sbin/fcgiwrap $PKG/usr/bin/
+ # rmdir $PKG/usr/sbin
+}
+
+post_build() {
+ install -d $PKG/etc/sv/fcgiwrap/log
+
+ # Listen on a unix socket; nginx (running as http) needs to reach it.
+ # We start fcgiwrap as fcgiwrap user, then chmod the socket so http can connect.
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'exec 2>&1' \
+ '' \
+ 'mkdir -p /run/fcgiwrap' \
+ 'rm -f /run/fcgiwrap/sock' \
+ '' \
+ 'chpst -u fcgiwrap:fcgiwrap \' \
+ ' fcgiwrap -c 4 -s unix:/run/fcgiwrap/sock &' \
+ 'pid=$!' \
+ '' \
+ '# Wait briefly for the socket, then make it accessible to http' \
+ 'i=0' \
+ 'while [ ! -S /run/fcgiwrap/sock ] && [ $i -lt 50 ]; do' \
+ ' sleep 0.1' \
+ ' i=$((i+1))' \
+ 'done' \
+ 'chgrp http /run/fcgiwrap/sock 2>/dev/null || true' \
+ 'chmod 660 /run/fcgiwrap/sock' \
+ '' \
+ 'wait $pid' \
+ > $PKG/etc/sv/fcgiwrap/run
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'mkdir -p /var/log/fcgiwrap' \
+ 'exec svlogd -tt /var/log/fcgiwrap' \
+ > $PKG/etc/sv/fcgiwrap/log/run
+
+ printf '%s\n' \
+ '#!/bin/sh' \
+ 'rm -f /run/fcgiwrap/sock' \
+ > $PKG/etc/sv/fcgiwrap/finish
+
+ chmod 755 $PKG/etc/sv/fcgiwrap/run
+ chmod 755 $PKG/etc/sv/fcgiwrap/log/run
+ chmod 755 $PKG/etc/sv/fcgiwrap/finish
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh