summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2013-03-23 19:42:13 +0000
committerOle Markus With <olemarkus@gentoo.org>2013-03-23 19:42:13 +0000
commit0c184e2aeb2979371e8eb162d5416580d22ee3ef (patch)
treea17ae4cb06c739a150de29cf1b00fa70ccfb7593 /app-admin
parentunpack_deb: auto rm the unpacked debian internal archives #458658 (diff)
downloadgentoo-2-0c184e2aeb2979371e8eb162d5416580d22ee3ef.tar.gz
gentoo-2-0c184e2aeb2979371e8eb162d5416580d22ee3ef.tar.bz2
gentoo-2-0c184e2aeb2979371e8eb162d5416580d22ee3ef.zip
Version bump. Resolving bug 323783, 389805 and 412913
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key C4A92BF5)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/eselect-php/ChangeLog11
-rw-r--r--app-admin/eselect-php/eselect-php-0.7.0.ebuild45
-rw-r--r--app-admin/eselect-php/files/70_mod_php5.conf-apache214
-rwxr-xr-xapp-admin/eselect-php/files/php-fpm49
-rwxr-xr-xapp-admin/eselect-php/files/php-fpm.init47
-rw-r--r--app-admin/eselect-php/metadata.xml3
6 files changed, 167 insertions, 2 deletions
diff --git a/app-admin/eselect-php/ChangeLog b/app-admin/eselect-php/ChangeLog
index 4476a08b5894..fcac1d4f11a4 100644
--- a/app-admin/eselect-php/ChangeLog
+++ b/app-admin/eselect-php/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-admin/eselect-php
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-php/ChangeLog,v 1.38 2012/09/12 03:04:01 ottxor Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-php/ChangeLog,v 1.39 2013/03/23 19:42:13 olemarkus Exp $
+
+*eselect-php-0.7.0 (23 Mar 2013)
+
+ 23 Mar 2013; Ole Markus With <olemarkus@gentoo.org> +eselect-php-0.7.0.ebuild,
+ +files/70_mod_php5.conf-apache2, +files/php-fpm, +files/php-fpm.init,
+ metadata.xml:
+ Version bump. Resolving bug 323783, 389805 and 412913
12 Sep 2012; Christoph Junghans <ottxor@gentoo.org> eselect-php-0.6.7.ebuild:
added prefix keywords
diff --git a/app-admin/eselect-php/eselect-php-0.7.0.ebuild b/app-admin/eselect-php/eselect-php-0.7.0.ebuild
new file mode 100644
index 000000000000..cd3b66f218e7
--- /dev/null
+++ b/app-admin/eselect-php/eselect-php-0.7.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-php/eselect-php-0.7.0.ebuild,v 1.1 2013/03/23 19:42:13 olemarkus Exp $
+
+EAPI=5
+
+inherit depend.apache
+
+DESCRIPTION="PHP eselect module"
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI="http://dev.gentoo.org/~olemarkus/eselect-php/eselect-php-${PV}.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="fpm apache2"
+
+DEPEND=">=app-admin/eselect-1.2.4
+ !!<dev-lang/php-5.3.23-r1:5.3
+ !!<dev-lang/php-5.4.13-r1:5.4
+ !!<dev-lang/php-5.5.0_beta1-r2:5.5
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+want_apache
+
+src_install() {
+ mv eselect-php-${PV} php.eselect
+ insinto /usr/share/eselect/modules/
+ doins php.eselect
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" \
+ "70_mod_php5.conf"
+ fi
+
+ if use fpm ; then
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm.init" "php-fpm"
+ fi
+}
diff --git a/app-admin/eselect-php/files/70_mod_php5.conf-apache2 b/app-admin/eselect-php/files/70_mod_php5.conf-apache2
new file mode 100644
index 000000000000..7ec8739cf837
--- /dev/null
+++ b/app-admin/eselect-php/files/70_mod_php5.conf-apache2
@@ -0,0 +1,14 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddHandler application/x-httpd-php .php .php5 .phtml
+ AddHandler application/x-httpd-php-source .phps
+ </IfModule>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/app-admin/eselect-php/files/php-fpm b/app-admin/eselect-php/files/php-fpm
new file mode 100755
index 000000000000..a7cd9bb80f39
--- /dev/null
+++ b/app-admin/eselect-php/files/php-fpm
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+
+set_phpvars() {
+ PHPSLOT=${SVCNAME#php-fpm-}
+ [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)"
+
+ PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+ PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid"
+
+ [ ${PHPSLOT} = 'php-fpm' ] && PHP_FPM_PID="/var/run/php-fpm.pid"
+}
+
+extra_commands="depend"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \
+ /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}"
+ local i=0
+ local timeout=5
+ while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
+ sleep 1
+ i=$(($i + 1))
+ done
+
+ [ $timeout -gt $i ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PHP FastCGI Process Manager"
+ set_phpvars
+ [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
+ eend $?
+}
diff --git a/app-admin/eselect-php/files/php-fpm.init b/app-admin/eselect-php/files/php-fpm.init
new file mode 100755
index 000000000000..a186d83478c5
--- /dev/null
+++ b/app-admin/eselect-php/files/php-fpm.init
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+
+set_phpvars() {
+ PHPSLOT=${SVCNAME#php-fpm-}
+ [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)"
+
+ PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+ PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid"
+}
+
+extra_commands="depend"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use apache2 lighttpd nginx
+}
+
+start() {
+ ebegin "Starting PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \
+ /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}"
+ local i=0
+ local timeout=5
+ while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
+ sleep 1
+ i=$(($i + 1))
+ done
+
+ [ $timeout -gt $i ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PHP FastCGI Process Manager"
+ set_phpvars
+ start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PHP FastCGI Process Manager"
+ set_phpvars
+ [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
+ eend $?
+}
diff --git a/app-admin/eselect-php/metadata.xml b/app-admin/eselect-php/metadata.xml
index fdc0d58d9226..b4348f2483fa 100644
--- a/app-admin/eselect-php/metadata.xml
+++ b/app-admin/eselect-php/metadata.xml
@@ -4,5 +4,8 @@
<herd>php</herd>
<longdescription lang="en">PHP eselect module
</longdescription>
+ <use>
+ <flag name='fpm'>Enable the FastCGI Process Manager SAPI</flag>
+ </use>
</pkgmetadata>