aboutsummaryrefslogtreecommitdiffstats
path: root/main/fcgiwrap
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-08-14 09:17:28 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-08-14 09:17:28 +0000
commitdff6c46b201b6ed231bbd07fac40b11ebde54a79 (patch)
treef874b85b1fd662ae56d7ae33db6dea3a2bafb781 /main/fcgiwrap
parent130040cf4c94e72fe52e6080e9328ea1762138fc (diff)
downloadaports-dff6c46b201b6ed231bbd07fac40b11ebde54a79.tar.bz2
aports-dff6c46b201b6ed231bbd07fac40b11ebde54a79.tar.xz
main/fcgiwrap: updated url, added initd. Fixes #7651
Diffstat (limited to 'main/fcgiwrap')
-rw-r--r--main/fcgiwrap/APKBUILD37
-rw-r--r--main/fcgiwrap/fcgiwrap.initd27
-rw-r--r--main/fcgiwrap/fcgiwrap.pre-install7
3 files changed, 54 insertions, 17 deletions
diff --git a/main/fcgiwrap/APKBUILD b/main/fcgiwrap/APKBUILD
index 44fc3fc964..daa3a6e295 100644
--- a/main/fcgiwrap/APKBUILD
+++ b/main/fcgiwrap/APKBUILD
@@ -1,34 +1,37 @@
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=fcgiwrap
pkgver=1.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Simple server for running CGI applications over FastCGI"
-url="https://nginx.localdomain.pl/wiki/FcgiWrap"
+url="https://github.com/gnosek/fcgiwrap"
arch="all"
license="MIT"
-depends=""
-depends_dev=""
+pkgusers="fcgiwrap"
+pkggroups="www-data"
+install="$pkgname.pre-install"
makedepends="$depends_dev autoconf libtool automake fcgi-dev"
-install=""
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/gnosek/$pkgname/archive/$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/gnosek/$pkgname/archive/$pkgver.tar.gz
+ $pkgname.initd"
-_builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$_builddir"
-
- autoreconf --install && \
- ./configure --prefix=/usr --mandir=/share/man --sbindir=/bin && \
- make
+ cd "$builddir"
+ autoreconf --install
+ ./configure --prefix=/usr \
+ --mandir=/share/man \
+ --sbindir=/bin
+ make
}
package() {
- cd "$_builddir"
-
+ cd "$builddir"
+ mkdir -p "$pkgdir"/var/run/fcgiwrap
make DESTDIR="$pkgdir" install
+ install -Dm755 $srcdir/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ chown $pkgusers.$pkggroups "$pkgdir"/var/run/fcgiwrap
}
-md5sums="d14f56bda6758a6e02aa7b3fb125cbce fcgiwrap-1.1.0.tar.gz"
-sha256sums="4c7de0db2634c38297d5fcef61ab4a3e21856dd7247d49c33d9b19542bd1c61f fcgiwrap-1.1.0.tar.gz"
-sha512sums="b8d35762d1d3c94a67602290b0092f0c38cffbbcd3dbc16597abf8b92172909b04450c238de2e430e841a17dd47fdd48d6a001f77539966980ef1af61e447ddc fcgiwrap-1.1.0.tar.gz"
+sha512sums="b8d35762d1d3c94a67602290b0092f0c38cffbbcd3dbc16597abf8b92172909b04450c238de2e430e841a17dd47fdd48d6a001f77539966980ef1af61e447ddc fcgiwrap-1.1.0.tar.gz
+b12afb8e54e7fb9f01bab74895bcffb49993fac1fc1091576c096d5a325abfd6579eb3dd9ec82aabc6dddb26dac584d216b5d0823cd802fd1d9078e82d883b12 fcgiwrap.initd"
diff --git a/main/fcgiwrap/fcgiwrap.initd b/main/fcgiwrap/fcgiwrap.initd
new file mode 100644
index 0000000000..f5faa7dfd9
--- /dev/null
+++ b/main/fcgiwrap/fcgiwrap.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+
+name="fcgiwrap"
+description="fcgiwrap cgi daemon"
+
+command="/usr/bin/fcgiwrap"
+command_args="-c 3 -s unix:/var/run/fcgiwrap/fcgiwrap.sock"
+command_background="yes"
+pidfile="/var/run/fcgiwrap/fcgiwrap.pid"
+user="fcgiwrap"
+group="www-data"
+
+depend() {
+ need net localmount
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --exec ${command} \
+ --pidfile ${pidfile} --make-pidfile \
+ --background \
+ -u ${user} -g ${group} \
+ --start -- ${command_args}
+ eend $?
+}
+
diff --git a/main/fcgiwrap/fcgiwrap.pre-install b/main/fcgiwrap/fcgiwrap.pre-install
new file mode 100644
index 0000000000..cdd114e0ec
--- /dev/null
+++ b/main/fcgiwrap/fcgiwrap.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+addgroup -S www-data 2>/dev/null
+adduser -S -D -H -h /var/run/fcgiwrap -s /sbin/nologin -G www-data \
+ fcgiwrap 2>/dev/null
+exit 0
+