summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2015-09-11 05:13:28 -0400
committerChris Severance2015-09-11 05:13:28 -0400
commitcb2e9e05a74aa17ae2f5cb76954242ca50373e7c (patch)
treeff9e62705fa76b90fa29a28c5d67e561eb051cb6
downloadaur-cb2e9e05a74aa17ae2f5cb76954242ca50373e7c.tar.gz
Initial Import
-rw-r--r--.SRCINFO40
-rw-r--r--PKGBUILD116
-rw-r--r--cherokee.logrotate9
-rw-r--r--cherokee.rc65
-rw-r--r--cherokee.service9
5 files changed, 239 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cacb73c1585
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,40 @@
+pkgbase = cherokee
+ pkgdesc = A very fast, flexible and easy to configure Web server
+ pkgver = 1.2.103.d021376
+ pkgrel = 1
+ url = http://cherokee-project.com
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = libldap
+ makedepends = pam
+ makedepends = libmariadbclient
+ makedepends = php-fpm
+ makedepends = ffmpeg
+ makedepends = geoip
+ makedepends = rrdtool
+ depends = openssl
+ depends = pcre
+ depends = python2
+ optdepends = libldap: ldap validator
+ optdepends = pam: pam validator
+ optdepends = php-fpm: php5 support
+ optdepends = libmariadbclient: mysql validator
+ optdepends = ffmpeg: Audio/Video streaming handler
+ optdepends = geoip: GeoIP rule module
+ optdepends = rrdtool: RRDtool based information collector
+ options = !libtool
+ backup = etc/cherokee/cherokee.conf
+ backup = etc/logrotate.d/cherokee
+ backup = etc/pam.d/cherokee
+ source = cherokee-v1.2.103.d021376.zip::https://github.com/cherokee/webserver/archive/v1.2.103.d021376.zip
+ source = cherokee.rc
+ source = cherokee.logrotate
+ source = cherokee.service
+ sha256sums = fb6390e55ae901493806cdc9bdf0a8d68ba6ac3ac76b20b05ad247c05b771311
+ sha256sums = 4c06cebfab8b68edd4967c020bfb41b077cfff10d76596d1ed192d0b6cedbd86
+ sha256sums = 20e26d633f8c1cd90eb21f41dd163b73a83846e405b1ce995e072c4efefc522e
+ sha256sums = 415a2e4cd7d04afe21e502dd0ad76301f85a7087cadbfdab5566bec469679a68
+
+pkgname = cherokee
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..84c74859736
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,116 @@
+# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: vorbote
+# Contributor: Fernando Jiménez Solano <fjim@sdfeu.org>
+# Contributor: Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor: Link Dupont <link@subpop.net>
+# Contributor: Pierre Bourdin <pierre@pi3rrot.net>
+
+set -u
+pkgname=cherokee
+pkgver=1.2.103.d021376
+pkgrel=1
+pkgdesc='A very fast, flexible and easy to configure Web server'
+arch=('i686' 'x86_64')
+url='http://cherokee-project.com'
+license=('GPL2')
+depends=('openssl' 'pcre' 'python2')
+makedepends=('libldap' 'pam' 'libmariadbclient' 'php-fpm' 'ffmpeg' 'geoip' 'rrdtool')
+optdepends=('libldap: ldap validator'
+ 'pam: pam validator'
+ 'php-fpm: php5 support'
+ 'libmariadbclient: mysql validator'
+ 'ffmpeg: Audio/Video streaming handler'
+ 'geoip: GeoIP rule module'
+ 'rrdtool: RRDtool based information collector')
+backup=('etc/cherokee/cherokee.conf'
+ 'etc/logrotate.d/cherokee'
+ 'etc/pam.d/cherokee')
+options=('!libtool')
+_srcdir="webserver-${pkgver}"
+_verwatch=("${url}/downloads" 'Version \(.*\)' 't')
+_srcfile="v${pkgver}.zip"
+source=("${pkgname}-${_srcfile}::https://github.com/cherokee/webserver/archive/${_srcfile}"
+ 'cherokee.rc'
+ 'cherokee.logrotate'
+# 'fix-ctk-path-handler-match.patch'
+# 'cherokee-1.2.101-ffmpeg0.11.patch'
+ 'cherokee.service')
+sha256sums=('fb6390e55ae901493806cdc9bdf0a8d68ba6ac3ac76b20b05ad247c05b771311'
+ '4c06cebfab8b68edd4967c020bfb41b077cfff10d76596d1ed192d0b6cedbd86'
+ '20e26d633f8c1cd90eb21f41dd163b73a83846e405b1ce995e072c4efefc522e'
+ '415a2e4cd7d04afe21e502dd0ad76301f85a7087cadbfdab5566bec469679a68')
+
+prepare() {
+ set -u
+ cd "${_srcdir}"
+
+ # Fix path matching bug in CTK apps (e.g. market)
+ #patch -Np1 -i "${srcdir}/fix-ctk-path-handler-match.patch"
+
+ # Fix this bug : https://bugs.mageia.org/show_bug.cgi?id=6145
+ #patch -Np1 -i "${srcdir}/cherokee-1.2.101-ffmpeg0.11.patch"
+
+ # Use subdirectory for logs
+ sed -i -r -e 's|(%localstatedir%/log)|\1/cherokee|' 'cherokee.conf.sample.pre'
+
+ # Use Python 2 in cherokee-admin
+ sed -i -e 's|"python"|"python2"|' 'cherokee/main_admin.c'
+
+ ./autogen.sh \
+ --prefix='/usr' \
+ --sysconfdir='/etc' \
+ --localstatedir='/var' \
+ --sbindir='/usr/bin' \
+ --with-wwwroot='/srv/cherokee/http' \
+ --with-cgiroot='/src/cherokee/cgi-bin' \
+ --with-wwwuser='http' \
+ --with-wwwgroup='http' \
+ --disable-static \
+ --with-php='/usr/bin/php-fpm' \
+ --with-python='python2' \
+ --enable-os-string='Arch Linux'
+ set +u
+}
+
+build() {
+ set -u
+ cd "${_srcdir}"
+ make -s -j "$(nproc)"
+ set +u
+}
+
+package() {
+ set -u
+ cd "${_srcdir}"
+
+ make DESTDIR="${pkgdir}" install
+
+ # PAM configuration file for cherokee
+ install -Dpm644 'pam.d_cherokee' "${pkgdir}/etc/pam.d/${pkgname}"
+
+ # Fix ownership of /var/lib/cherokee/graphs
+ chown -R 'http:http' "${pkgdir}/var/lib/${pkgname}/graphs"
+
+ # Use Python 2 (mostly fixed upstream, from the Cherokee PKGBUILD)
+ sed -i -e 's/env python$/&2/' "${pkgdir}/usr/bin/CTK-run"
+ #"${pkgdir}/usr/share/cherokee/admin/"{server,upgrade_config}.py
+ #"${pkgdir}/usr/bin/"{CTK-run,cherokee-{admin-launcher,tweak}}
+ #sed -i -r -e "s/['\"]python/&2/g" \
+ # "${pkgdir}/usr/share/cherokee/admin/wizards/django.py"
+
+ # Compile Python scripts
+ python2 -m 'compileall' "${pkgdir}"
+ python2 -O -m 'compileall' "${pkgdir}"
+
+ install -d -o 'http' -g 'http' "${pkgdir}/var/log/${pkgname}"
+ #install -Dpm755 "${srcdir}/${pkgname}.rc" "${pkgdir}/etc/rc.d/${pkgname}"
+ install -Dpm644 "${srcdir}/${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}"
+ install -Dpm644 "${srcdir}/${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
+
+ # Cleanup
+ rm -rf "${pkgdir}/srv"
+ set +u
+}
+set +u
+
+# vim:set ts=2 sw=2 et:
diff --git a/cherokee.logrotate b/cherokee.logrotate
new file mode 100644
index 00000000000..19207fd0200
--- /dev/null
+++ b/cherokee.logrotate
@@ -0,0 +1,9 @@
+/var/log/cherokee/*.error /var/log/cherokee/*.access {
+ daily
+ rotate 14
+ compress
+ sharedscripts
+ postrotate
+ /bin/kill -HUP `cat /var/run/cherokee.pid 2>/dev/null` 2>/dev/null || true
+ endscript
+}
diff --git a/cherokee.rc b/cherokee.rc
new file mode 100644
index 00000000000..2d413dc13f9
--- /dev/null
+++ b/cherokee.rc
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+daemon_name=cherokee
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+ if [ ! -f /var/run/$daemon_name.pid ] && $daemon_name -d &>/dev/null; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ [ -f /var/run/$daemon_name.pid ] && read PID </var/run/$daemon_name.pid
+ if kill $PID &>/dev/null; then
+ rm_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ reload)
+ stat_busy "Reloading $daemon_name daemon"
+ [ -f /var/run/$daemon_name.pid ] && read PID </var/run/$daemon_name.pid
+ if kill -HUP $PID &>/dev/null; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ restart)
+ stat_busy "Restarting $daemon_name daemon"
+ [ -f /var/run/$daemon_name.pid ] && read PID </var/run/$daemon_name.pid
+ if kill -USR1 $PID &>/dev/null; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|reload|restart|status}"
+esac
+
+exit 0
diff --git a/cherokee.service b/cherokee.service
new file mode 100644
index 00000000000..7a5b95e4315
--- /dev/null
+++ b/cherokee.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Cherokee web server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/cherokee
+
+[Install]
+WantedBy=multi-user.target