initial import
This commit is contained in:
67
fcgiwrap/PKGBUILD
Normal file
67
fcgiwrap/PKGBUILD
Normal file
@@ -0,0 +1,67 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=fcgiwrap
|
||||
pkgver=1.1.0
|
||||
_debver=$pkgver
|
||||
_debrel=12
|
||||
pkgrel=7
|
||||
pkgdesc="A simple, free and libre server for running CGI applications over FastCGI"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/gnosek/fcgiwrap'
|
||||
license=('Expat')
|
||||
depends=('fcgi')
|
||||
makedepends=('quilt')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/gnosek/fcgiwrap/archive/${pkgver}.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/f/fcgiwrap/fcgiwrap_${_debver}-${_debrel}.debian.tar.xz"
|
||||
"${pkgname}.initd"
|
||||
"${pkgname}.confd"
|
||||
"${pkgname}.run")
|
||||
sha512sums=('b8d35762d1d3c94a67602290b0092f0c38cffbbcd3dbc16597abf8b92172909b04450c238de2e430e841a17dd47fdd48d6a001f77539966980ef1af61e447ddc'
|
||||
'1fbed12c22fe9fb7b7df46776eae7a90e4691c2663f124888c8c583ef9aaa08d1e028d9f18e3bc942c50c9f9c932b82814c1439ad3af6caef2e7b360da9adfb3'
|
||||
'b4a4a15b4285c4200a53d094aeb5026ed0606be0122175fdb44a7ec7f37ae27486d369a26d8ceb7d5d3b667ba69ca6d61d504bf2843c3f0a1aa7fb1f87a7bfb6'
|
||||
'893e9afa92c20c9d0dab68fffc806a1be1f2e28a7e73bbb497316386a9ee083be4bad68a90f660e489311a9812a512b50fb0edb8b9c49b12f6cd266ba53b01a6'
|
||||
'80fa8e0f95c4f5b6ea3fb51a9e22046cb7b1401edaa2dcbc18451a6224652083ad301380806086b261e70184e8c77dcdec111ff7ef14f0327dae53d37fc50bd4')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply
|
||||
rm -v debian/patches/fix_systemd.patch || true
|
||||
rm -v debian/patches/libsystemd.patch || true
|
||||
rm -v debian/patches/systemd_socket_requires.patch || true
|
||||
rm -v debian/patches/systemd_use_defaults.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
autoreconf --install
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--mandir=/share/man \
|
||||
--sbindir=/bin
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm644 debian/copyright -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
|
||||
# services
|
||||
install -Dm755 "${srcdir}"/${pkgname}.initd "${pkgdir}"/etc/init.d/${pkgname}
|
||||
install -Dm644 "${srcdir}"/${pkgname}.confd "${pkgdir}"/etc/conf.d/${pkgname}
|
||||
install -Dm755 "${srcdir}/${pkgname}.run" "${pkgdir}/etc/sv/${pkgname}/run"
|
||||
}
|
||||
6
fcgiwrap/fcgiwrap.confd
Normal file
6
fcgiwrap/fcgiwrap.confd
Normal file
@@ -0,0 +1,6 @@
|
||||
# set number of preforked children. defaults to number of system CPUs
|
||||
#nproc=$(nproc)
|
||||
|
||||
# set listen socket. Defaults to unix:/run/fcgiwrap/fcgiwrap.sock
|
||||
#socket=unix:/run/fcgiwrap/fcgiwrap.sock
|
||||
|
||||
44
fcgiwrap/fcgiwrap.initd
Normal file
44
fcgiwrap/fcgiwrap.initd
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="fcgiwrap"
|
||||
description="fcgiwrap cgi daemon"
|
||||
|
||||
command="/usr/bin/fcgiwrap"
|
||||
command_background="yes"
|
||||
user="http"
|
||||
group="http"
|
||||
: ${socket:=unix:/run/fcgiwrap/fcgiwrap.sock}
|
||||
|
||||
depend() {
|
||||
need net localmount
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
command_args="-c ${nproc:-$(nproc)} -s $socket"
|
||||
case "$socket" in
|
||||
unix:/*)
|
||||
local socket_path=${socket#unix:}
|
||||
checkpath --directory --mode 2775 --owner ${user}:${group} \
|
||||
${socket_path%/*}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${name}"
|
||||
start-stop-daemon --exec ${command} \
|
||||
--background \
|
||||
-k 0002 \
|
||||
-u ${user} -g ${group} \
|
||||
--start -- ${command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
case "$socket" in
|
||||
unix:/*)
|
||||
rm -f "${socket#unix:}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
2
fcgiwrap/fcgiwrap.run
Normal file
2
fcgiwrap/fcgiwrap.run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec fcgiwrap -s unix:/run/fcgiwrap.sock 2>&1
|
||||
Reference in New Issue
Block a user