summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/xfce-theme-greybird/PKGBUILD32
-rw-r--r--radio/idjc/idjc_0.8.4_configure.patch12
-rw-r--r--social/anubis/PKGBUILD30
-rwxr-xr-xsocial/asterisk/PKGBUILD8
-rw-r--r--social/inspircd/PKGBUILD62
-rw-r--r--social/inspircd/gnutls.patch12
-rw-r--r--social/inspircd/inspircd.install15
-rw-r--r--social/inspircd/inspircd.rcd50
-rw-r--r--social/libnatpmp/PKGBUILD2
-rwxr-xr-xsocial/sobby/PKGBUILD12
-rwxr-xr-xsocial/tokyocabinet/PKGBUILD4
-rw-r--r--~fauno/faenza-icon-theme/PKGBUILD35
-rw-r--r--~fauno/kyotocabinet/PKGBUILD26
-rw-r--r--~fauno/kyototycoon/PKGBUILD26
-rw-r--r--~fauno/spawn-fcgi-php/PKGBUILD40
-rw-r--r--~fauno/spawn-fcgi-php/nginx.conf.example34
-rw-r--r--~fauno/spawn-fcgi-php/public_html.conf.example16
-rw-r--r--~fauno/spawn-fcgi-php/server.conf.example22
-rwxr-xr-x~fauno/spawn-fcgi-php/spawn-fcgi-php460
-rw-r--r--~fauno/spawn-fcgi-php/spawn-fcgi-php.conf60
20 files changed, 945 insertions, 13 deletions
diff --git a/pcr/xfce-theme-greybird/PKGBUILD b/pcr/xfce-theme-greybird/PKGBUILD
new file mode 100644
index 000000000..0c5f9501d
--- /dev/null
+++ b/pcr/xfce-theme-greybird/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: flan_suse
+pkgname=xfce-theme-greybird
+pkgver=1.0.7
+pkgrel=1
+pkgdesc="A grey and blue Xfce theme, introduced in the release of Xubuntu 11.04 and updated for 12.04; includes the classic low saturation theme"
+arch=('any')
+url="http://shimmerproject.org/projects/greybird/"
+license=('GPL2' 'CC-BY-SA-3.0')
+groups=('xfce-themes-shimmer-collection')
+depends=('gtk-engine-murrine')
+optdepends=('shimmer-wallpapers: contains the Greybird wallpaper, among others'
+ 'gtk3: required for CSS/GTK3 theme'
+ 'elementary-xfce-icons: matching icon set; use the dark icon theme'
+ 'lightdm-gtk-greeter: required for the LightDM GTK theme'
+ 'lightdm-unity-greeter: required for the LightDM Unity theme'
+ 'gtk-engine-unico: required for gtk3 support for the classic theme; not required for the current theme')
+source=($pkgname-$pkgver.tar.gz::https://github.com/shimmerproject/Greybird/tarball/v${pkgver})
+
+package() {
+ cd "${srcdir}/shimmerproject-Greybird"*
+
+ # Create installation directories
+ install -d -m755 "${pkgdir}/usr/share/themes/Greybird"{,\ Compact}
+
+ # Install the current theme
+ cp -a * "${pkgdir}/usr/share/themes/Greybird/"
+
+ # Make a symbolic link for the compact version of the xfwm4 theme
+ cd "${pkgdir}/usr/share/themes/Greybird Compact"
+ ln -s "../${_pkgname}/xfwm4_compact" "xfwm4"
+}
+md5sums=('d7c291408cd644e102cf811ee62e7a37')
diff --git a/radio/idjc/idjc_0.8.4_configure.patch b/radio/idjc/idjc_0.8.4_configure.patch
new file mode 100644
index 000000000..9f1b3c5f0
--- /dev/null
+++ b/radio/idjc/idjc_0.8.4_configure.patch
@@ -0,0 +1,12 @@
+diff -Naur idjc-0.8.4/configure idjc-0.8.4.new/configure
+--- idjc-0.8.4/configure 2010-10-07 15:00:07.000000000 +0200
++++ idjc-0.8.4.new/configure 2010-10-20 19:30:48.000000000 +0200
+@@ -5349,7 +5349,7 @@
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mutagen" >&5
+ $as_echo_n "checking for mutagen... " >&6; }
+-python -c "import mutagen" &>/dev/null
++$PYTHON -c "import mutagen" &>/dev/null
+ if test $? -ne 0 ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
diff --git a/social/anubis/PKGBUILD b/social/anubis/PKGBUILD
new file mode 100644
index 000000000..8835d2275
--- /dev/null
+++ b/social/anubis/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Nicolás Reynolds <fauno@kiwwwi.com.ar>
+# Contributor: Nathan Owe <ndowens04 at gmail>
+pkgname=anubis
+pkgver=4.1.1
+pkgrel=2
+pkgdesc="An SMTP message submission daemon. "
+arch=('i686')
+url="http://www.gnu.org/software/anubis/"
+license=('GPL3')
+depends=('guile' 'gpgme' 'gnutls' 'gsasl' 'pam' 'pcre' 'tcp_wrappers')
+source=(ftp://ftp.gnu.org/gnu/anubis/$pkgname-$pkgver.tar.gz)
+md5sums=('28df4daee11bc74a9e4b19b425d8a196')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ ./configure --prefix=/usr \
+ --with-pam \
+ --with-pcre \
+ --with-tcp-wrappers \
+ --with-socks-proxy
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir/ install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/social/asterisk/PKGBUILD b/social/asterisk/PKGBUILD
index 7318e71dc..896d5bacf 100755
--- a/social/asterisk/PKGBUILD
+++ b/social/asterisk/PKGBUILD
@@ -1,7 +1,7 @@
# Contributor: Alessio Biancalana <dottorblaster@gmail.com>
pkgname=asterisk
-pkgver=1.8.7.0
+pkgver=10.9.0
pkgrel=1
pkgdesc="A complete PBX solution"
arch=('i686' 'x86_64')
@@ -9,13 +9,13 @@ url="http://www.asterisk.org"
license=('GPL')
depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl')
makedepends=('postgresql' 'unixodbc' 'sqlite3')
-optdepends=('libpri' 'libss7' 'openr2')
+optdepends=('libpri' 'libss7' 'openr2' 'iksemel')
backup=(etc/asterisk/asterisk.conf)
-source=(http://downloads.digium.com/pub/asterisk/releases/asterisk-$pkgver.tar.gz \
+source=(http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$pkgver.tar.gz \
asterisk \
asterisk.logrotated)
install=$pkgname.install
-md5sums=('5c6616a53fa3f300420ea17fd23abae9'
+md5sums=('2fb85dc753584ac13692c27f9749c6cb'
'59146273738605f1e011d8e7bed3561a'
'486e07a0a1405ea25ec5b1736034653e')
diff --git a/social/inspircd/PKGBUILD b/social/inspircd/PKGBUILD
new file mode 100644
index 000000000..6165f7c31
--- /dev/null
+++ b/social/inspircd/PKGBUILD
@@ -0,0 +1,62 @@
+pkgname=inspircd
+pkgver=2.0.5
+pkgrel=2
+pkgdesc='A lightweight IRC daemon'
+arch=('x86_64' 'i686')
+url='http://www.inspircd.org/'
+license=('GPL2')
+depends=('perl' 'gnutls' 'openssl' 'libgcrypt')
+makedepends=('pkg-config' 'mysql' 'postgresql' 'sqlite3' 'libldap' 'geoip' 'tre')
+optdepends=('mysql: m_mysql'
+ 'pcre: m_regex_pcre'
+ 'postgresql: m_pgsql'
+ 'sqlite3: m_sqlite3'
+ 'libldap: m_ldapoper and m_ldapauth'
+ 'geoip: m_geoip'
+ 'tre: m_regex_tre')
+install=inspircd.install
+backup=('etc/inspircd/inspircd.conf')
+
+source=(http://www.inspircd.org/downloads/InspIRCd-$pkgver.tar.bz2 inspircd.rcd gnutls.patch)
+md5sums=('60dec04bdc8f8c473f3c7bd774a1f153'
+ 'f4f32d944401b1602ab6716476892afd'
+ '6312154e759e5d71b85c7dca71b7a4fd')
+
+build() {
+ cd "${srcdir}/inspircd"
+ patch -Np1 -i "${srcdir}/gnutls.patch"
+
+ ./configure \
+ --enable-extras=m_geoip.cpp \
+ --enable-extras=m_ldapauth.cpp \
+ --enable-extras=m_ldapoper.cpp \
+ --enable-extras=m_mysql.cpp \
+ --enable-extras=m_pgsql.cpp \
+ --enable-extras=m_regex_pcre.cpp \
+ --enable-extras=m_regex_posix.cpp \
+ --enable-extras=m_regex_tre.cpp \
+ --enable-extras=m_sqlite3.cpp
+
+ ./configure \
+ --prefix=/usr/lib/inspircd \
+ --binary-dir=/usr/sbin \
+ --module-dir=/usr/lib/inspircd/modules \
+ --config-dir=/etc/inspircd \
+ --enable-gnutls \
+ --enable-openssl \
+ --enable-epoll
+
+ make
+}
+
+package() {
+ install -Dm755 "${srcdir}"/inspircd.rcd "${pkgdir}"/etc/rc.d/inspircd
+ install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd"
+ install -o141 -g141 -dm750 "${pkgdir}/var/run/inspircd"
+
+ cd "${srcdir}/inspircd"
+ make DESTDIR="$pkgdir" INSTUID=141 install
+
+ rm -rf "${pkgdir}"/usr/lib/inspircd/logs
+ rm -rf "${pkgdir}"/usr/lib/inspircd/data
+}
diff --git a/social/inspircd/gnutls.patch b/social/inspircd/gnutls.patch
new file mode 100644
index 000000000..3975c418c
--- /dev/null
+++ b/social/inspircd/gnutls.patch
@@ -0,0 +1,12 @@
+ff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
+index b8c4815..d58caa8 100644
+--- a/src/modules/extra/m_ssl_gnutls.cpp
++++ b/src/modules/extra/m_ssl_gnutls.cpp
+@@ -20,7 +20,7 @@
+
+ /* $ModDesc: Provides SSL support for clients */
+ /* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */
+-/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */
++/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") -lgcrypt */
+
+ enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED };
diff --git a/social/inspircd/inspircd.install b/social/inspircd/inspircd.install
new file mode 100644
index 000000000..ec97113f5
--- /dev/null
+++ b/social/inspircd/inspircd.install
@@ -0,0 +1,15 @@
+post_install() {
+ getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd >/dev/null
+ getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d /var/lib/inspircd -s /bin/false -c inspircd inspircd >/dev/null
+
+ echo '==> You will need to create a config file for inspircd'
+ echo '==> cp /etc/inspircd/inspircd.conf.example /etc/inspircd/inspircd.conf'
+ echo '==> You will need to change the pidfile. To do this you can insert the following into your config.'
+ echo '==> <pid file="/var/run/inspircd/inspircd.pid">'
+ echo '==> Remember to use absolute paths in your config directory and not relative paths like you would do with a user-based inspircd install.'
+}
+
+post_remove() {
+ getent passwd inspircd &>/dev/null && userdel inspircd >/dev/null
+ getent group inspircd &>/dev/null && groupdel inspircd >/dev/null
+}
diff --git a/social/inspircd/inspircd.rcd b/social/inspircd/inspircd.rcd
new file mode 100644
index 000000000..a041b9be4
--- /dev/null
+++ b/social/inspircd/inspircd.rcd
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+get_pid() {
+ pidof /usr/sbin/inspircd
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting inspircd"
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ su -s /bin/sh -c '/usr/sbin/inspircd --logfile /var/log/inspircd/startup.log --config /etc/inspircd/inspircd.conf' 'inspircd' > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ add_daemon inspircd
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping inspircd"
+ PID=$(get_pid)
+ [ ! -z "$PID" ] && kill $PID
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon inspircd
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/social/libnatpmp/PKGBUILD b/social/libnatpmp/PKGBUILD
index e81d3445f..ded1e6ca5 100644
--- a/social/libnatpmp/PKGBUILD
+++ b/social/libnatpmp/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=libnatpmp
pkgver=20120821
pkgrel=1
pkgdesc="A portable and fully compliant implementation of the NAT-PMP protocol"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://miniupnp.free.fr/libnatpmp.html"
license=('BSD')
depends=('glibc')
diff --git a/social/sobby/PKGBUILD b/social/sobby/PKGBUILD
index 644c74aec..50f847db9 100755
--- a/social/sobby/PKGBUILD
+++ b/social/sobby/PKGBUILD
@@ -1,16 +1,14 @@
# Maintainer: Thomas Jost <schnouki@schnouki.net>
pkgname=sobby
-pkgver=0.4.7
+pkgver=0.4.8
pkgrel=1
pkgdesc="Standalone obby server"
url="http://gobby.0x539.de/trac/"
license="GPL"
-depends=('obby>=0.4.7' 'libxml++')
+depends=('obby=0.4.8' 'libxml++')
makedepends=('pkgconfig' 'net6>=1.3.12')
-arch=('i686' 'x86_64')
-source=(http://releases.0x539.de/sobby/sobby-$pkgver.tar.gz)
-md5sums=('816ac9e2ecf2ac79306f9bbb80699464')
-sha1sums=('ca20369eabce1657d090b310d78d4a35d697f28b')
+arch=('i686' 'x86_64' 'mips6el')
+source=(http://releases.0x539.de/sobby/sobby-$pkgver.tar.gz{,.sig})
build() {
cd $srcdir/$pkgname-$pkgver
@@ -22,3 +20,5 @@ package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
}
+md5sums=('1f7cf8c09cdeddbf2152843b28f73ce1'
+ '96822427ab95289ebb1520e6353c5d3c')
diff --git a/social/tokyocabinet/PKGBUILD b/social/tokyocabinet/PKGBUILD
index 6e9b7969d..7b3a55c80 100755
--- a/social/tokyocabinet/PKGBUILD
+++ b/social/tokyocabinet/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Nicolas Martyanoff <khaelin@gmail.com>
pkgname=tokyocabinet
-pkgver=1.4.47
+pkgver=1.4.48
pkgrel=1
pkgdesc="a modern implementation of DBM"
arch=('i686' 'x86_64')
@@ -11,7 +11,7 @@ license=('LGPL')
makedepends=('gcc>=3.1' 'make' 'pkgconfig')
depends=('zlib' 'bzip2')
source=("http://fallabs.com/tokyocabinet/${pkgname}-${pkgver}.tar.gz")
-md5sums=('3d94fe2aebf5d9ff0478ed895bc46fc9')
+md5sums=('fd03df6965f8f56dd5b8518ca43b4f5e')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/~fauno/faenza-icon-theme/PKGBUILD b/~fauno/faenza-icon-theme/PKGBUILD
new file mode 100644
index 000000000..f79704510
--- /dev/null
+++ b/~fauno/faenza-icon-theme/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Frikilinux <frikilinux at frikilinux.com.ar>
+# Contributor: graysky <graysky AT archlinux DOT us>
+# Contributor: Samsagax <samsagax AT gmail DOT com>
+# Contributor: simongmzlj <simongmzlj AT gmail DOT com>
+
+pkgname=faenza-icon-theme
+pkgver=1.2
+pkgrel=2
+pkgdesc="Icon theme designed for Equinox GTK theme"
+url="http://gnome-look.org/content/show.php/Faenza?content=128143"
+license=('GPL3')
+arch=('any')
+makedepends=()
+options=(!strip)
+source=("http://ppa.launchpad.net/tiheum/equinox/ubuntu/pool/main/f/${pkgname}/${pkgname}_${pkgver}.tar.gz")
+sha256sums=('171332a31993be9aacd1e270b78af75e22c02e0c744b64b2efa6c7d4fca89016')
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ mkdir -p "${pkgdir}"/usr/share/icons
+ cp -rf Faenza{,-Dark,-Darkest,-Darker} "${pkgdir}"/usr/share/icons/
+
+ # set the Arch Linux Dristributor and start menu logo
+ for theme in Faenza{,-Dark}; do
+ for size in 22 24 32 48 64 96; do
+ cd "${pkgdir}"/usr/share/icons/${theme}/places/${size}/
+ ln -sf distributor-logo{-archlinux,}.png
+ ln -sf start-here{-archlinux,}.png
+ done;
+ cd "${pkgdir}"/usr/share/icons/${theme}/places/scalable/
+ ln -sf distributor-logo{-archlinux,}.svg
+ ln -sf start-here{-archlinux,}.svg
+ ln -sf start-here{-archlinux-symbolic,-symbolic}.svg
+ done;
+}
diff --git a/~fauno/kyotocabinet/PKGBUILD b/~fauno/kyotocabinet/PKGBUILD
new file mode 100644
index 000000000..1636bfda0
--- /dev/null
+++ b/~fauno/kyotocabinet/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Alexander Duscheleit <jinks@archlinux.us>
+# Contributor: Joaquim Pedro (osmano807) <osmano807@gmail.com>
+pkgname=kyotocabinet
+pkgver=1.2.76
+pkgrel=1
+pkgdesc="a modern implementation of DBM in C++"
+arch=('i686' 'x86_64')
+url="http://fallabs.com/kyotocabinet"
+license=('LGPL3')
+makedepends=('gcc>=3.1' 'make' 'pkgconfig' 'zlib')
+depends=('zlib' 'gcc-libs')
+source=("http://fallabs.com/${pkgname}/pkg/${pkgname}-${pkgver}.tar.gz")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make install DESTDIR="$pkgdir/"
+}
+sha512sums=('278db7b327eb4c21bf0137d9aa14fb67d74d5ce7ed1cb29fc9120d157a60de165ec0cf842903eb7952e8f998045ae585b958977fa973ba0e0773381de71d9f6a')
diff --git a/~fauno/kyototycoon/PKGBUILD b/~fauno/kyototycoon/PKGBUILD
new file mode 100644
index 000000000..af88f6020
--- /dev/null
+++ b/~fauno/kyototycoon/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Alexander Duscheleit <jinks@archlinux.us>
+pkgname=kyototycoon
+pkgver=0.9.56
+pkgrel=1
+pkgdesc="A lightweight conncurent remote frontend for Kyoto Cabinet."
+arch=('i686' 'x86_64')
+url="http://fallabs.com/kyototycoon"
+license=('GPL3')
+depends=('zlib' 'kyotocabinet')
+source=("http://fallabs.com/${pkgname}/pkg/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('553e4ea83237d9153cc5e17881092cefe0b224687f7ebcc406b061b2f31c75c6')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make install DESTDIR="$pkgdir/"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/~fauno/spawn-fcgi-php/PKGBUILD b/~fauno/spawn-fcgi-php/PKGBUILD
new file mode 100644
index 000000000..a49858417
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/PKGBUILD
@@ -0,0 +1,40 @@
+# Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com>
+pkgname=spawn-fcgi-php
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="script to provide simple cgi-php support for nginx http daemon"
+arch=('any')
+url="http://aur.archlinux.org/packages.php?ID=37439"
+license=('GPL')
+depends=('php-cgi' 'spawn-fcgi')
+backup=('etc/conf.d/spawn-fcgi-php.conf')
+source=(
+ 'spawn-fcgi-php'
+ 'spawn-fcgi-php.conf'
+ 'server.conf.example'
+ 'nginx.conf.example'
+ 'public_html.conf.example'
+)
+
+build() {
+ # Install script and configuration file
+ install -Dm775 spawn-fcgi-php \
+ ${pkgdir}/etc/rc.d/spawn-fcgi-php || return 1
+ install -Dm664 spawn-fcgi-php.conf \
+ ${pkgdir}/etc/conf.d/spawn-fcgi-php.conf || return 1
+
+ # Install examples of configuration
+ install -Dm664 public_html.conf.example \
+ ${pkgdir}/etc/nginx/conf/public_html.conf.example || return 1
+ install -Dm644 server.conf.example \
+ ${pkgdir}/etc/nginx/conf/server.conf.example || return 1
+ install -Dm664 nginx.conf.example \
+ ${pkgdir}/etc/nginx/conf/nginx.conf.example || return 1
+}
+
+# vim:set ts=2 sw=2 et ft=sh:
+md5sums=('9088c130caebf43902f958c985200811'
+ 'a8bfb0b50120c91449c8a08144706c9b'
+ 'c02189e88531386cd67d3401924c18ae'
+ '00bf49fc8a0d8c9f6c96305fae8471d4'
+ '9202545dc3701d5933804890312667e6')
diff --git a/~fauno/spawn-fcgi-php/nginx.conf.example b/~fauno/spawn-fcgi-php/nginx.conf.example
new file mode 100644
index 000000000..35d0868f3
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/nginx.conf.example
@@ -0,0 +1,34 @@
+user http;
+worker_processes 1;
+
+error_log logs/error.log;
+
+#pid logs/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ # the file with mapping username per port
+ include /etc/nginx/conf/map_user2port.conf;
+ #or only
+ #include map_user2port.conf
+
+ # Servers configurations ...
+ include server.conf.example;
+
+ }
+}
diff --git a/~fauno/spawn-fcgi-php/public_html.conf.example b/~fauno/spawn-fcgi-php/public_html.conf.example
new file mode 100644
index 000000000..74f6c2b4b
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/public_html.conf.example
@@ -0,0 +1,16 @@
+location ~ ^/~([^/]+)(/?.*)$ {
+ set $username $1;
+ alias /home/$1/public_html/$2;
+ autoindex on;
+ location ~ \.php {
+ #fastcgi_pass 127.0.0.1:9000;
+ # or for multiusers, one port per user
+ fastcgi_pass 127.0.0.1:$port;
+ # or for unix domain sockets
+ #fastcgi_pass unix:/var/run/spawn-fcgi/spawn-fcgi.$username.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/conf/fastcgi_params;
+ }
+}
+# vi: ft=nginx
diff --git a/~fauno/spawn-fcgi-php/server.conf.example b/~fauno/spawn-fcgi-php/server.conf.example
new file mode 100644
index 000000000..06160cfb2
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/server.conf.example
@@ -0,0 +1,22 @@
+server {
+ listen 80;
+ server_name domain.tld;
+ root /srv/http/domain.tld;
+
+ index index.php index.html;
+
+ access_log logs/access.log;
+ error_log logs/error.log;
+
+ location ~ \.php {
+ # TCP
+ fastcgi_pass 127.0.0.1:9000;
+ # or SOCKET
+ #fastcgi_pass unix:/var/run/spawn-fcgi/spawn-fcgi.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include /etc/nginx/conf/fastcgi_params;
+ }
+ include public_html.conf.example;
+}
+# vi: ft=nginx
diff --git a/~fauno/spawn-fcgi-php/spawn-fcgi-php b/~fauno/spawn-fcgi-php/spawn-fcgi-php
new file mode 100755
index 000000000..607ebab8c
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/spawn-fcgi-php
@@ -0,0 +1,460 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+NAME=spawn-fcgi-php
+CONF="/etc/conf.d/spawn-fcgi-php.conf"
+#-------------------------------------------------------------------------------
+# Return value for:
+# for check_process
+PROCNOPIDEXIST=-1 # none process is running and pidfile exist
+PROCNOPIDNO=0 # none process is running
+PROCRUNPIDEXIST=1 # process is running, pidfile exist and has size >0b
+PROCRUNPID0=2 # process is running, pidfile has size 0b
+PROCRUNPIDNO=3 # process is running, pidfile doesn't exist
+OTHERERROR=255
+# check_daemon
+DAEMONEXIST=0
+DAEMONNOEXIST=1
+#-------------------------------------------------------------------------------
+
+# Reading configuration
+if [ -r "$CONF" ]; then
+ . $CONF
+else
+ stat_fail
+ stat_busy "File $CONF not found"
+ stat_die
+fi
+check_config(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: check_config
+# DESCRIPTION: Check configuration file
+# PARAMETERS:
+# RETURNS: 0 if all right
+#===============================================================================
+ # testing DAEMON
+ if [ ! -x "$DAEMON" ]; then
+ stat_fail
+ stat_busy "File $DAEMON isn't executable"
+ stat_die
+ fi
+ # testing USER and GROUP
+ if [ -z "$USER" -o -z "$GROUP" ]; then
+ stat_fail
+ stat_busy "The variable USER/GROUP isn't defined. I cann't run process $PHPCGI as root."
+ stat_die
+ fi
+ # testing directory of socket
+ if [ -n "$SOCKET" ]; then
+ local sockdir=$(dirname "$SOCKET")
+ if [ ! -d "$sockdir" ]; then
+ mkdir -p "$sockdir"
+ fi
+ fi
+ # testing directory for user's socket
+ if [ -n "$USERSOCKET" ]; then
+ local socksdir=$(dirname "$USERSOCKET")
+ if [ ! -d "$socksdir" ]; then
+ mkdir -p "$socksdir"
+ fi
+ fi
+ # testing directory of pidfile
+ if [ -n "$PIDFILE" ]; then
+ if [ ! -d $(dirname $PIDFILE) ]; then
+ mkdir -p $(dirname $PIDFILE)
+ fi
+ fi
+ # testing the program php-cgi
+ if [ -z "$PHPCGI" ]; then
+ stat_fail
+ stat_busy "The variable PHPCGI isn't defined"
+ stat_die
+ else
+ if [ ! -x "$PHPCGI" ]; then
+ stat_fail
+ stat_busy "The program $PHPCGI isn't executable"
+ stat_die
+ fi
+ fi
+ return 0
+} #}}}
+check_process(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: check_process
+# DESCRIPTION: Check that process is alive
+# PARAMETERS: name of process and/or pidfile
+# RETURNS: look at the beginning of the script
+#===============================================================================
+ local process
+ local pidfile
+ if [ $# -eq 2 ]; then
+ process=$1
+ pidfile=$2
+ elif [ $# -eq 1 ]; then
+ process=$1
+ else
+ return $OTHERERROR
+ fi
+
+ if get_pid $process >/dev/null; then
+ # process is running
+ if [ -s "$pidfile" ]; then
+ return $PROCRUNPIDEXIST
+ elif [ -r "$pidfile" ]; then
+ return $PROCRUNPID0
+ else
+ return $PROCRUNPIDNO
+ fi
+ else
+ # process doesn't runnig
+ if [ -r "$pidfile" ]; then
+ return $PROCNOPIDEXIST
+ else
+ return $PROCNOPIDNO
+ fi
+ fi
+} #}}}
+get_userpid(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: get_userpid
+# DESCRIPTION: looking for pid of process belong to user
+# PARAMETERS: name of user, name of process
+# RETURNS: pid of process or 1 if error
+#===============================================================================
+ local user=$1
+ local process=$2
+ if [ -n "$user" -a -n "$process" ]; then
+ local pid=$(ps aux | \
+ awk -vuser=$user -vprocess=$process \
+ '$1 == user && $8 ~ "s" && $11 == process {print $2}')
+ if [[ "$pid" =~ ^[0-9]+$ ]]; then
+ echo $pid
+ else
+ return 1
+ fi
+ else
+ return 1
+ fi
+} #}}}
+check_daemon(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: check_daemon
+# DESCRIPTION: check that daemon exist in directory
+# PARAMETERS: name of daemon
+# RETURNS: look at the beginning of the script
+#===============================================================================
+ if ck_daemon $NAME; then
+ return $DAEMONEXIST
+ else
+ return $DAEMONEXIST
+ fi
+} #}}}
+start(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: start
+# DESCRIPTION: check configuration, if a process is already running and running php-cgi daemon
+# PARAMETERS: -
+# RETURNS: -
+#===============================================================================
+ stat_busy "Checking configuration"
+ check_config &&
+ stat_done || \
+ stat_die
+
+ stat_busy "Starting server $NAME" #{{{
+ check_process $PHPCGI $PIDFILE
+ local error=$?
+ if [ $error -ge $PROCRUNPIDEXIST -a $error -le $PROCRUNPIDNO ]; then
+ stat_fail
+ case $error in
+ $PROCRUNPIDEXIST)
+ stat_busy "The process $PHP is running"
+ ;;
+ $PROCRUNPID0)
+ stat_busy "The process $PHP is running and pidfile has size 0b"
+ ;;
+ $PROCRUNPIDNO)
+ stat_busy "The process $PHP is running and pidfile doesn't exist"
+ ;;
+ esac
+ stat_die $error
+ elif [ $error -eq $OTHERERROR ]; then
+ stat_fail
+ stat_busy "Something went wrong..."
+ stat_die $returnvalue
+ fi
+
+ # run the main daemon
+ $DAEMON $OPTIONS >/dev/null
+ if [ $? -eq 0 ]; then
+ add_daemon $NAME
+ stat_done
+ else
+ stat_die
+ fi
+ #}}}
+ #{{{ start daemons for multiusers
+ if [ -n "$STARTMULTI" ]; then
+ stat_busy "Starting server $NAME for multiusers"
+ gen_all_uid
+ if [ -z "$USERSOCKET" ]; then
+ # Generate file map user 2 port
+ :>$MAPUSER2PORT
+ cat >> $MAPUSER2PORT <<- EOF
+ # Map username to port
+ map \$username \$port {
+ default $PORT;
+
+ EOF
+ local userport=$PORT
+ local uid
+ for uid in ${ALLUID[@]}; do
+ local login=$(uid2login $uid)
+ if [ $? -eq 0 ]; then
+ userport=$((userport+1))
+ echo -e "$login $userport;" >> $MAPUSER2PORT
+ local gid=$(id -g $login)
+ local group=$(gid2group $gid)
+ if [ -n "$USERPIDFILE" ]; then
+ local userpidfile=${USERPIDFILE}.${login}.pid
+ fi
+ USEROPTIONS="-a $IPADDR -p $userport -u $login ${group:+-g $group} -f $PHPCGI -C ${USER_PHP_FCGI_CHILDREN:-1} ${userpidfile:+-P $userpidfile}"
+ $DAEMON $USEROPTIONS &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_die
+ fi
+ fi
+ done
+ echo '}' >> $MAPUSER2PORT
+ stat_done
+ elif [ -n "$USERSOCKET" ]; then
+ local uid
+ for uid in ${ALLUID[@]}; do
+ local login=$(uid2login $uid)
+ if [ $? -eq 0 ]; then
+ local gid=$(id -g $login)
+ local group=$(gid2group $gid)
+ if [ -n "$USERPIDFILE" ]; then
+ local userpidfile=${USERPIDFILE}.${login}.pid
+ fi
+ local usersocket=${USERSOCKET}.${login}.sock
+ USEROPTIONS="-s ${usersocket} -u $login ${group:+-g $group} -f $PHPCGI -C ${USER_PHP_FCGI_CHILDREN:-1} ${userpidfile:+-P $userpidfile}"
+ $DAEMON $USEROPTIONS &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_die
+ fi
+ fi
+ done
+ stat_done
+ fi
+ fi
+ #}}}
+} #}}}
+stop(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: stop
+# DESCRIPTION: check whether a process is running, stop the daemon php-cgi
+# PARAMETERS: -
+# RETURNS: -
+#===============================================================================
+ stat_busy "Stopping server $NAME" #{{{
+ # for main daemon
+ if ! get_pid $PHPCGI &>/dev/null; then
+ stat_fail
+ stat_busy "None process $PHPCGI isn't running"
+ stat_die
+ else
+ #process php-cgi is running
+ if [ -s "$PIDFILE" ]; then
+ # pidfile exists
+ kill $(<$PIDFILE)
+ if [ $? -eq 0 ]; then
+ rm -f $PIDFILE
+ rm_daemon $NAME
+ stat_done
+ else
+ stat_die
+ fi
+ else #pidfile doesn't exist
+ if [ -r "$PIDFILE" ]; then
+ #pidfile exists and has size 0b
+ stat_busy "Pidfile $PIDFILE exists and has size 0b.Removing it"
+ rm -f "$PIDFILE" && \
+ stat_done || \
+ stat_fail
+ fi
+ killall -9 $PHPCGI
+ if [ $? -eq 0 ]; then
+ stat_done
+ rm_daemon $NAME
+ else
+ stat_die
+ fi
+ fi
+ fi
+ #}}}
+ #{{{ for multiusers
+ if [ -n "$STARTMULTI" ]; then
+ # waiting to kill the main daemon
+ sleep 1
+ if get_pid $PHPCGI &>/dev/null; then
+ stat_busy "Stopping server $NAME for multiusers"
+ killall $PHPCGI
+ # cleaning pidfiles
+ if [ -n "$USERPIDFILE" ]; then
+ gen_all_uid
+ for UserID in ${ALLUID[@]}; do
+ local login=$(uid2login $UserID)
+ if [ $? -eq 0 ]; then
+ rm -f ${USERPIDFILE}.${login}.pid
+ fi
+ done
+ fi #$USERPIDFILE
+ stat_done
+ fi
+ fi
+ #}}}
+} #}}}
+restart(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: restart
+# DESCRIPTION: stop and start service
+# PARAMETERS: -
+# RETURNS: -
+#===============================================================================
+ stat_busy "Restarting server $NAME"
+ stop
+ sleep 1
+ start
+} #}}}
+status(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: status
+# DESCRIPTION: check status of service
+# PARAMETERS: -
+# RETURNS: -
+#===============================================================================
+ if ! get_pid $PHPCGI>/dev/null; then
+ stat_busy "None process $PHPCGI isn't running"
+ stat_done
+ else
+ stat_busy "Process $PHPCGI is running"
+ stat_done
+ if [ -s "$PIDFILE" ]; then
+ stat_busy "It's spawned by process: $(cat $PIDFILE|tr '\n' ' ')";
+ stat_done
+ elif [ -r "$PIDFILE" ]; then
+ stat_fail
+ stat_busy "Pidfile $PIDFILE exists but has size 0b"
+ else
+ stat_busy "Pidfile $PIDFILE doesn't exist"
+ stat_done
+ fi
+ if [ -n "$STARTMULTI" -a -n "$USERSSTATUS" ]; then
+ gen_all_uid
+ local uid
+ for uid in ${ALLUID[@]}; do
+ local login=$(uid2login $uid)
+ if [ $? -eq 0 ]; then
+ if [ -n "$USERPIDFILE" ]; then
+ # USERPIDFILE defined
+ local userpidfile=${USERPIDFILE}.${login}.pid
+ if [ -s "$userpidfile" ]; then
+ stat_busy "Process $PHPCGI of user $login is spawned by process: $(cat $userpidfile|tr '\n' ' ')";
+ stat_done
+ fi
+ else
+ local pid=$(get_userpid $login $PHPCGI)
+ if [ $? -eq 0 ]; then
+ stat_busy "Process $PHPCGI for user $login is running and it's spawned by: $pid";
+ stat_done
+ fi
+ fi
+ fi
+ done
+ fi
+ fi
+} #}}}
+uid2login(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: uid2login
+# DESCRIPTION: convert uid to username
+# PARAMETERS: uid
+# RETURNS: name of user for uid
+#===============================================================================
+ local uid=$1
+ if [ ! $uid -gt 0 ]; then
+ return 1
+ fi
+ local username=$(getent passwd | awk -vuid=$uid -F: '$3 == uid {print $1}')
+ if [ -z "$username" ]; then
+ return 1
+ else
+ echo $username
+ fi
+} #}}}
+gid2group(){ #{{{
+ #=== FUNCTION ================================================================
+ # NAME: uid2group
+ # DESCRIPTION: convert gid to name of group
+ # PARAMETERS: gid
+ # RETURNS: name of group for gid
+ #===============================================================================
+ local gid=$1
+ if [ ! $gid -gt 0 ]; then
+ return 1
+ fi
+ local groupname=$(getent group | awk -vgid=$1 -F: '$3 == gid {print $1}')
+ if [ -z "$groupname" ]; then
+ return 1
+ else
+ echo $groupname
+ fi
+} #}}}
+gen_all_uid(){ #{{{
+#=== FUNCTION ================================================================
+# NAME: gen_all_uid
+# DESCRIPTION: Generate array of all UID
+# PARAMETERS: -
+# RETURNS: -
+#===============================================================================
+ ALLUID=()
+ if [ -n "$RANGEUID" -a ${#RANGEUID[@]} -gt 0 ]; then
+ for line in ${RANGEUID[@]/,/ }; do
+ (( line )) || stat_die # not a number
+ if [[ ${line/-/} != $line ]]; then
+ for ((i=${line%-*}; i<=${line#*-}; i++)); do
+ ALLUID+=($i)
+ done
+ else
+ ALLUID+=($line)
+ fi
+ done
+ elif [ $FIRSTUID -gt 1 -a $LASTUID -gt 1 -a $LASTUID -ge $FIRSTUID ]; then
+ for ((line=FIRSTUID; line<=LASTUID; line++)); do
+ (( line )) || stat_die #not a number
+ ALLUID+=($line)
+ done
+ else
+ echo "Error: Wrong range UID. Change RANGEUID or FIRSTUID and LASTUID"
+ exit 1
+ fi
+} #}}}
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo "Usage: $0 start|stop|restart|status"
+esac
diff --git a/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
new file mode 100644
index 000000000..d87520c1d
--- /dev/null
+++ b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf
@@ -0,0 +1,60 @@
+# vi: ft=sh
+# run PHPCGI as
+USER=http
+GROUP=http
+
+# Name of daemon
+DAEMON="/usr/bin/spawn-fcgi"
+PIDFILE="/var/run/spawn-fcgi-php.pid"
+# spawn the process
+PHPCGI="/usr/bin/php-cgi"
+
+#-------------------------------------------------------------------------------
+# Options for php-cgi
+#-------------------------------------------------------------------------------
+# (PHP only) Number of children to spawn
+PHP_FCGI_CHILDREN=4
+# or export PHP_FCGI_CHILDREN
+# PHP FastCGI proccess exit after requests:
+export PHP_FCGI_MAX_REQUESTS=1000
+# Choose ONE of PORT/IPADDR (for TCP) OR SOCKET (for unix domain sockets)
+IPADDR=127.0.0.1
+PORT=9000
+#SOCKET=/var/run/spawn-fcgi/spawn-fcgi.sock
+# Options only for socket
+#MODE=0644
+#SOCKET_USER=other
+#SOCKET_GROUP=other
+
+#-------------------------------------------------------------------------------
+# Options for spawn-fcgi
+#-------------------------------------------------------------------------------
+# Number of children to fork, defaults to 1.
+SPAWN_FCGI_CHILDREN=1
+
+
+#-------------------------------------------------------------------------------
+# For many users
+#-------------------------------------------------------------------------------
+# Run separate processes for users with UIDs from the range RANGEUID
+# uncomment STARTMULTI if you want this
+STARTMULTI=yes
+# Base user's socket, uncomment to use socket instead IPADDR:USERPORT
+USERSOCKET='/var/run/spawn-fcgi/spawn-fcgi'
+# file with mapping user to port
+MAPUSER2PORT='/etc/nginx/conf/map_user2port.conf'
+# Base user's pidfile
+#USERPIDFILE='/var/run/spawn-fcgi-php'
+# range for UIDs, use the dash for range and split groups by spaces e.g. 1000-1003 1005 1010-1020, use parenthis for all
+RANGEUID=(1000-1001)
+# (PHP only) Number of children to spawn
+USER_PHP_FCGI_CHILDREN=1
+# for status, comment if you don't want print status for users
+#USERSSTATUS=yes
+
+OPTIONS="-u $USER -g $GROUP -f $PHPCGI -C ${PHP_FCGI_CHILDREN:-4} ${PIDFILE:+-P $PIDFILE} -F ${SPAWN_FCGI_CHILDREN:-1} "
+if [ -n "$SOCKET" ]; then
+ OPTIONS+="-s $SOCKET ${MODE:+-M $MODE} ${SOCKET_USER:+-U $SOCKET_USER} ${SOCKET_GROUP:+-G $SOCKET_GROUP} "
+else
+ OPTIONS+="-a $IPADDR -p $PORT "
+fi