summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2011-08-26 11:58:08 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2011-08-26 11:58:08 +0000
commit6e5eafce3139ae1d5c415b5c3809072cae26f613 (patch)
tree325f2f7e8ebbbe97f48b168f14138b8895b28eba /www-servers
parentVersion bump. (diff)
downloadgentoo-2-6e5eafce3139ae1d5c415b5c3809072cae26f613.tar.gz
gentoo-2-6e5eafce3139ae1d5c415b5c3809072cae26f613.tar.bz2
gentoo-2-6e5eafce3139ae1d5c415b5c3809072cae26f613.zip
Version bumped. Added php and static-libs USE flags. Removed fastcgi USE flag. Added PYTHON_USE_WITH="theads", bug #364533. Added many fixes.
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/cherokee/ChangeLog10
-rw-r--r--www-servers/cherokee/cherokee-1.2.98.ebuild172
-rw-r--r--www-servers/cherokee/files/cherokee-1.2.98-gentoo.patch26
-rw-r--r--www-servers/cherokee/files/cherokee-1.2.98-linux3.patch45
-rw-r--r--www-servers/cherokee/files/cherokee-confd-1.2.984
-rw-r--r--www-servers/cherokee/files/cherokee-initd-1.2.9866
6 files changed, 322 insertions, 1 deletions
diff --git a/www-servers/cherokee/ChangeLog b/www-servers/cherokee/ChangeLog
index 5f45b35f239d..1bb6bffa82d6 100644
--- a/www-servers/cherokee/ChangeLog
+++ b/www-servers/cherokee/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-servers/cherokee
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/ChangeLog,v 1.84 2011/05/24 07:03:20 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/ChangeLog,v 1.85 2011/08/26 11:58:08 matsuu Exp $
+
+*cherokee-1.2.98 (26 Aug 2011)
+
+ 26 Aug 2011; MATSUU Takuto <matsuu@gentoo.org> +files/cherokee-confd-1.2.98,
+ +files/cherokee-initd-1.2.98, +cherokee-1.2.98.ebuild,
+ +files/cherokee-1.2.98-gentoo.patch, +files/cherokee-1.2.98-linux3.patch:
+ Version bumped. Added php and static-libs USE flags. Removed fastcgi USE
+ flag. Added PYTHON_USE_WITH="theads", bug #364533. Added many fixes.
*cherokee-1.2.2 (24 May 2011)
diff --git a/www-servers/cherokee/cherokee-1.2.98.ebuild b/www-servers/cherokee/cherokee-1.2.98.ebuild
new file mode 100644
index 000000000000..1107dfa8e5ef
--- /dev/null
+++ b/www-servers/cherokee/cherokee-1.2.98.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-1.2.98.ebuild,v 1.1 2011/08/26 11:58:08 matsuu Exp $
+
+EAPI="3"
+PYTHON_DEPEND="admin? 2"
+PYTHON_USE_WITH="threads"
+
+inherit eutils multilib pam python versionator
+
+DESCRIPTION="An extremely fast and tiny web server."
+SRC_URI="http://www.cherokee-project.com/download/$(get_version_component_range 1-2)/${PV}/${P}.tar.gz"
+HOMEPAGE="http://www.cherokee-project.com/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="admin coverpage ffmpeg debug geoip ipv6 kernel_linux ldap mysql nls pam php rrdtool ssl static static-libs"
+
+COMMON_DEPEND="dev-libs/libpcre
+ >=sys-libs/zlib-1.1.4-r1
+ ffmpeg? ( virtual/ffmpeg )
+ geoip? ( dev-libs/geoip )
+ ldap? ( net-nds/openldap )
+ mysql? ( >=virtual/mysql-5 )
+ nls? ( virtual/libintl )
+ pam? ( virtual/pam )
+ php? ( || (
+ dev-lang/php[fpm]
+ dev-lang/php[cgi]
+ ) )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ rrdtool? ( net-analyzer/rrdtool )"
+
+RESTRICT="test"
+
+pkg_setup() {
+ python_pkg_setup
+
+ python_set_active_version 2
+
+ enewgroup cherokee
+ enewuser cherokee -1 -1 /var/www cherokee
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-linux3.patch"
+
+ python_convert_shebangs -r 2 .
+}
+
+src_configure() {
+ local myconf
+
+ if use admin ; then
+ myconf="${myconf} --enable-admin --with-python=$(PYTHON -2)"
+ else
+ myconf="${myconf} --disable-admin --without-python"
+ fi
+
+ # Uses autodetect because --with-php requires path to php-{fpm,cgi}.
+ if ! use php ; then
+ myconf="${myconf} --without-php"
+ fi
+
+ if use static ; then
+ myconf="${myconf} --enable-static-module=all"
+ fi
+
+ local os="Unknown"
+ case "${CHOST}" in
+ *-freebsd*)
+ os="FreeBSD" ;;
+ *-netbsd*)
+ os="NetBSD" ;;
+ *-openbsd*)
+ os="OpenBSD" ;;
+ *)
+ os="Linux" ;;
+ esac
+
+ # This make cherokee 1.2 sad
+ # $(use_enable threads pthread) \
+ econf \
+ $(use_enable debug trace) \
+ $(use_enable debug backtraces) \
+ $(use_enable ipv6) \
+ $(use_enable kernel_linux epoll) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable static-libs static) \
+ $(use_with ffmpeg) \
+ $(use_with geoip) \
+ $(use_with ldap) \
+ $(use_with mysql) \
+ $(use_with ssl libssl) \
+ --disable-dependency-tracking \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --enable-os-string="Gentoo ${os}" \
+ --enable-tmpdir="${EPREFIX}/var/tmp" \
+ --localstatedir="${EPREFIX}/var" \
+ --with-wwwroot="${EPREFIX}/var/www/localhost/htdocs" \
+ --with-cgiroot="${EPREFIX}/var/www/localhost/cgi-bin" \
+ --with-wwwuser=cherokee \
+ --with-wwwgroup=cherokee \
+ ${myconf} || die "configure failed"
+}
+
+src_test() {
+ emake test || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ if ! use static-libs ; then
+ find "${ED}" -name '*.la' -delete || die
+ elif ! use static ; then
+ find "${ED}/usr/$(get_libdir)/cherokee" '(' -name '*.la' -o -name '*.a' ')' -delete || die
+ fi
+
+ dodoc AUTHORS ChangeLog README || die
+
+ use pam && pamd_mimic system-auth cherokee auth account session
+
+ newinitd "${FILESDIR}/${PN}-initd-${PV}" ${PN} || die "newinitd ${PN} failed"
+ newconfd "${FILESDIR}/${PN}-confd-${PV}" ${PN} || die "newconfd ${PN} failed"
+
+ if ! use admin ; then
+ rm -r \
+ "${ED}"/usr/bin/cherokee-admin-launcher \
+ "${ED}"/usr/bin/CTK-run \
+ "${ED}"/usr/sbin/cherokee-admin \
+ "${ED}"/usr/share/cherokee/admin
+ fi
+
+ exeinto /usr/share/doc/${PF}/contrib
+ doexe contrib/{bin2buffer.py,make-cert.sh,make-dh_params.sh,tracelor.py}
+
+ keepdir /var/www/localhost/htdocs /var/log/cherokee
+ fowners cherokee:cherokee /var/log/cherokee
+
+ if ! use coverpage ; then
+ rm -rf "${ED}"/var/www/localhost/htdocs/*
+ fi
+}
+
+pkg_postinst() {
+ if use admin ; then
+ python_mod_optimize "${EPREFIX}/usr/share/cherokee/admin/"
+ echo
+ elog "Just run '/usr/sbin/cherokee-admin' and go to: http://localhost:9090"
+ echo
+ else
+ echo
+ elog "Try USE=admin if you want an easy way to configure cherokee."
+ echo
+ fi
+ elog "emerge www-servers/spawn-fcgi if you use Ruby on Rails with ${PN}."
+ echo
+}
+
+pkg_postrm() {
+ if use admin ; then
+ python_mod_cleanup "${EPREFIX}/usr/share/cherokee/admin/"
+ fi
+}
diff --git a/www-servers/cherokee/files/cherokee-1.2.98-gentoo.patch b/www-servers/cherokee/files/cherokee-1.2.98-gentoo.patch
new file mode 100644
index 000000000000..cc547e9118d6
--- /dev/null
+++ b/www-servers/cherokee/files/cherokee-1.2.98-gentoo.patch
@@ -0,0 +1,26 @@
+diff -Naur cherokee-1.2.98.orig/cherokee.conf.sample.pre cherokee-1.2.98/cherokee.conf.sample.pre
+--- cherokee-1.2.98.orig/cherokee.conf.sample.pre 2011-05-03 18:01:42.000000000 +0900
++++ cherokee-1.2.98/cherokee.conf.sample.pre 2011-08-25 17:51:33.615130274 +0900
+@@ -18,6 +18,8 @@
+ server!server_tokens = full
+ server!panic_action = %prefix%/bin/cherokee-panic
+ server!pid_file = %localstatedir%/run/cherokee.pid
++server!user = cherokee
++server!group = cherokee
+
+ # Default virtual server
+ #
+@@ -27,11 +29,11 @@
+
+ vserver!1!logger = combined
+ vserver!1!logger!access!type = file
+-vserver!1!logger!access!filename = %localstatedir%/log/cherokee.access
++vserver!1!logger!access!filename = %localstatedir%/log/cherokee/cherokee.access
+ vserver!1!logger!access!buffsize = 16384
+
+ vserver!1!error_writer!type = file
+-vserver!1!error_writer!filename = %localstatedir%/log/cherokee.error
++vserver!1!error_writer!filename = %localstatedir%/log/cherokee/cherokee.error
+
+ vserver!1!rule!1!match = default
+ vserver!1!rule!1!handler = common
diff --git a/www-servers/cherokee/files/cherokee-1.2.98-linux3.patch b/www-servers/cherokee/files/cherokee-1.2.98-linux3.patch
new file mode 100644
index 000000000000..e1e335264b6c
--- /dev/null
+++ b/www-servers/cherokee/files/cherokee-1.2.98-linux3.patch
@@ -0,0 +1,45 @@
+diff -Naur cherokee-1.2.98.orig/admin/SystemStats.py cherokee-1.2.98/admin/SystemStats.py
+--- cherokee-1.2.98.orig/admin/SystemStats.py 2011-05-03 18:01:41.000000000 +0900
++++ cherokee-1.2.98/admin/SystemStats.py 2011-08-26 13:05:08.128851462 +0900
+@@ -39,7 +39,7 @@
+ global _stats
+
+ if not _stats:
+- if sys.platform == 'linux2':
++ if sys.platform == 'linux2' or sys.platform == 'linux3':
+ _stats = System_stats__Linux()
+ elif sys.platform == 'darwin':
+ _stats = System_stats__Darwin()
+diff -Naur cherokee-1.2.98.orig/admin/market/InstallUtil.py cherokee-1.2.98/admin/market/InstallUtil.py
+--- cherokee-1.2.98.orig/admin/market/InstallUtil.py 2011-05-03 18:01:41.000000000 +0900
++++ cherokee-1.2.98/admin/market/InstallUtil.py 2011-08-26 13:05:06.596844132 +0900
+@@ -56,7 +56,7 @@
+ first_group = str(root_group)
+
+ # Systems
+- if sys.platform == 'linux2':
++ if sys.platform == 'linux2' or sys.platform == 'linux3':
+ if os.getuid() == 0:
+ return root_group
+ return first_group
+@@ -72,7 +72,7 @@
+
+
+ def current_UID_is_admin():
+- if sys.platform == 'linux2':
++ if sys.platform == 'linux2' or sys.platform == 'linux3':
+ return os.getuid() == 0
+ elif sys.platform == 'darwin':
+ return os.getuid() == 0
+diff -Naur cherokee-1.2.98.orig/admin/util.py cherokee-1.2.98/admin/util.py
+--- cherokee-1.2.98.orig/admin/util.py 2011-03-31 17:30:04.000000000 +0900
++++ cherokee-1.2.98/admin/util.py 2011-08-26 13:05:04.622834682 +0900
+@@ -341,7 +341,7 @@
+ def os_get_document_root():
+ if sys.platform == 'darwin':
+ return "/Library/WebServer/Documents"
+- elif sys.platform == 'linux2':
++ elif sys.platform == 'linux2' or sys.platform == 'linux3':
+ if os.path.exists ("/etc/redhat-release"):
+ return '/var/www'
+ elif os.path.exists ("/etc/fedora-release"):
diff --git a/www-servers/cherokee/files/cherokee-confd-1.2.98 b/www-servers/cherokee/files/cherokee-confd-1.2.98
new file mode 100644
index 000000000000..62e7fd64f787
--- /dev/null
+++ b/www-servers/cherokee/files/cherokee-confd-1.2.98
@@ -0,0 +1,4 @@
+# /etc/conf.d/cherokee: config file for /etc/init.d/cherokee
+
+#CHEROKEE_OPTS="--config=/etc/cherokee/cherokee.conf --valgrind"
+CHEROKEE_OPTS=""
diff --git a/www-servers/cherokee/files/cherokee-initd-1.2.98 b/www-servers/cherokee/files/cherokee-initd-1.2.98
new file mode 100644
index 000000000000..9c4136f24938
--- /dev/null
+++ b/www-servers/cherokee/files/cherokee-initd-1.2.98
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="${ops} configtest graceful reload"
+
+CHEROKEE="/usr/sbin/cherokee"
+
+depend() {
+ need net
+ use dns ldap logger mysql netmount
+}
+
+checkconfig() {
+ ${CHEROKEE} -t 1>/dev/null 2>&1
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ eerror "${SVCNAME} has detected an error in your config:"
+ ${CHEROKEE} -t ${CHEROKEE_OPTS}
+ fi
+ return $?
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet \
+ --exec ${CHEROKEE} -- -d ${CHEROKEE_OPTS}
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${CHEROKEE}
+ eend $?
+}
+
+graceful() {
+ checkconfig || return 1
+
+ ebegin "Gracefully restarting ${SVCNAME}"
+ start-stop-daemon \
+ --exec ${CHEROKEE} \
+ --signal HUP
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Restarting ${SVCNAME} and closing all open connections"
+ start-stop-daemon \
+ --exec ${CHEROKEE} \
+ --signal USR1
+ eend $?
+}