aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2015-04-20 18:22:15 +0100
committerStuart Shelton <stuart@shelton.me>2015-04-20 18:22:15 +0100
commit5bffb0b3fe80fe10e5c78a33fbe90225dc72c58c (patch)
treec1f1582ac7163d0905b51af8f7664388cf203fe4 /app-eselect
parentAdd mail-filter/spamassassin-3.4.0 (diff)
downloadsrcshelton-5bffb0b3fe80fe10e5c78a33fbe90225dc72c58c.tar.gz
srcshelton-5bffb0b3fe80fe10e5c78a33fbe90225dc72c58c.tar.bz2
srcshelton-5bffb0b3fe80fe10e5c78a33fbe90225dc72c58c.zip
Move app-admin/eselect-php to app-eselect/eselect-php, add app-eselect/eselect-php-0.7.1-r4
Diffstat (limited to 'app-eselect')
-rw-r--r--app-eselect/eselect-php/Manifest10
-rw-r--r--app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild51
-rw-r--r--app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild50
-rw-r--r--app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild50
-rw-r--r--app-eselect/eselect-php/files/70_mod_php5.conf-apache214
-rw-r--r--app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r118
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher7
-rwxr-xr-xapp-eselect/eselect-php/files/php-fpm-r1.init50
-rw-r--r--app-eselect/eselect-php/files/php-fpm.conf1
-rw-r--r--app-eselect/eselect-php/files/php-fpm_at.service14
10 files changed, 265 insertions, 0 deletions
diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
new file mode 100644
index 00000000..350abe99
--- /dev/null
+++ b/app-eselect/eselect-php/Manifest
@@ -0,0 +1,10 @@
+AUX 70_mod_php5.conf-apache2 348 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c SHA512 c74ec09c3c4124a15e14ece4bb769bb889466160cc0878ca3d55d5afc30fd4c05673c40428b75be669f72e82ba29f60ed19767caca77bba8adc12aae1c83f6f3 WHIRLPOOL fd503ec904a3853b90f8f4cc2042cf9014fdb1383a508d22e680559009b5b1e0beb5a09909a393e53868a64712c63e35642915787fa4176af07cb594adedb441
+AUX 70_mod_php5.conf-apache2-r1 486 SHA256 83c041f18919c04ec31c2bf7491fbf9465a5c3201161601afe246060af3041a7 SHA512 d912aee2a08a7cf13562a479e35376c15179a1205d56431b6ecd1bbe8a5a28663afaeeda94f90aaf2ad960b359a8460ab25990181bdacc26e83c05b1501b1f9c WHIRLPOOL 2f12ecd7d54b4a686d7223707ebb3a8660ecbd90f9660b1cdb8f7832c57737a89d97a68ac420cccdb5609e86a5ce9dfa5fd15f17d5be223260ed83ece4cc6349
+AUX php-fpm-launcher 134 SHA256 d7e944a016a8a282b9a684de1820c8e5c00791c27471a528b1ee8dc620eb83e8 SHA512 4304ea6df7093af06f1b7df5bf5d8ed7692403cc64a5c4c516e49d36fa866b33e4815876d28cc365f5ccb1e301ef7ce9b57e15ed959a41c91fb25af7236fed29 WHIRLPOOL f6123fb338a10e23f21616ab1bbfa385289748cff9523c2a1d39e82f53f104eacc0f3b088794a12b678551b7d8ef1b6262480882b62ce38067e923e7592b4629
+AUX php-fpm-r1.init 1207 SHA256 59ac0166b12eb454b6d0c92694b3d54cce3b3fb92cc0c9fbe0ac9f9ed9ca2cc5 SHA512 ec8f2d74e4c4c7f36bb9207386bbc4f705547829e2e0282f2799d224f42ebc6ee3a021b6be6e6597b16bf64316421687de80eb446134e42c6c7310d4027725af WHIRLPOOL 751cd97fe962ba7177f346a4280b619c98b622214df6d9a626519d29e2a3ae71e292e1ff5fb384b9ff570865087f877f61dee017b101c409e3d743e0ab228c76
+AUX php-fpm.conf 33 SHA256 99f2c030d6d37c8f846c9d06ac1953d82750725f2eaff65dded5e0e2a1e2556a SHA512 5c5bcc95343ffc31066276eca98a771082a27e3d015827a97d3d9d6cd837c41064a560cedd92df2388a4f2c139a0bfe5ead8e5e27f4b8149a1b6beb60a01a5a5 WHIRLPOOL bf9e56395425224c8f08680e12e5ba33d6c3ca7be036a2d93db473221e610440b191992ac1ab40185e944c2bbda288fde2cacf12905250ea895a6c48e0679312
+AUX php-fpm_at.service 321 SHA256 2bd9ae1dacba4db39c4dc39000c6450234dd6fce06be6fe32cbd6adb96d56b50 SHA512 298c05211748212b00ea9b1debb1cde04df0ca3bde6ee5e30634c510e4c4bdc5bf8dcb998f63a5a3bb232dabb53ebc105ab5bd10c4de21863b5744363d80cbe6 WHIRLPOOL 415686e54ac9da2b051ba5a1c9a65952d683f03f7e434c4a8f74f5176a5d591f570b5fb1314e4b793568ff3d6eac944d9e12e4b71dc31447f36a8e3d6845630d
+DIST eselect-php-0.7.1.bz2 2251 SHA256 10aa400e2d08bc71989366993f12ddb546a0ea29f191c40e37beba1d11d7abd7 SHA512 a6b4c1475dda9f368d799db7658c50cef7d6f71482a53a186fb1394e7ea1fff3c0ef123c82b7ca4d1e45aadb0a034d36f213fc9450766878a60d28639761cb3d WHIRLPOOL a4e45492068616ff30fd888b0cc64441a6eb6e6656e0107d00bd2cf15360dce15052d4d62089ab89d43e6bb36e126529aa101c70e8bd94a9fc916a5369463e3b
+EBUILD eselect-php-0.7.1-r2.ebuild 1429 SHA256 fe973417497f774b5634bc4a4c151bb2d1fad5f94971a08f6819c072e0fc3c37 SHA512 1eff167c06559a54e8c711b64eff7699794b14c59eb75cf8a2ff21ed8830f5e153859e79529137014a417ecdd4349f4f0109e372611c94933f90d071a0e7d78d WHIRLPOOL 25bb065f13cba0ed658e03efd258bf894a9d51f8b463a830278fc7024ff4d950c8f1737fa288c8220e51bc74b3b51b6808fb2d204237f352df61be66d5b23922
+EBUILD eselect-php-0.7.1-r3.ebuild 1356 SHA256 12463d7b701be483dbef1fce00647dd34ccb3bb3850446af6651f4abd2da0217 SHA512 740e6f5861a0b9afa1a144d7ae36004246195c7391f9ff9cf3a9b4a5f2ed6087f57772952a0045d9ee1d6d0a3e958230d4d1370ffd8fcf898d84b931fe2195a9 WHIRLPOOL 5fb4de778f7559a69eae62fbb568993236df3317fb71467fab0e99f59b9d0460d03d4e7c19a3d0edfda70490691f6c2ada6347aec5a59436f44711a178b012f2
+EBUILD eselect-php-0.7.1-r4.ebuild 1366 SHA256 f0942f50849a5f69cef457c4935ac60642ebea424d774869aacab0c965239beb SHA512 fc6665cfbf8d99f49d5d9f54fd2c25e8a28a799e428b75f9ffa4bea9149c1cda06a2bf9289895253fd92de80902beab38d86e18d9497e3f2fd13fbb00ad4d201 WHIRLPOOL fbe62d81a0e316014dc0ec4c08733a6192c44f4f94f15d59a16342652512a15d77d7d0c300a7ab6526768560a2914e815383e38ceac8efc3dee62a29d218e4c6
diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild
new file mode 100644
index 00000000..0e389cb5
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-php/eselect-php-0.7.1-r2.ebuild,v 1.1 2015/03/31 16:53:51 ulm Exp $
+
+EAPI=5
+
+inherit depend.apache systemd
+
+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 systemd"
+
+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-r1.init" "php-fpm"
+ if use systemd ; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@.service"
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ fi
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/php-fpm-launcher"
+ fi
+}
diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild
new file mode 100644
index 00000000..66dda814
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-php/eselect-php-0.7.1-r3.ebuild,v 1.1 2015/03/31 16:53:51 ulm Exp $
+
+EAPI=5
+
+inherit depend.apache systemd
+
+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 ~arm64 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 systemd"
+
+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-r1.init" "php-fpm"
+ if use systemd ; then
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ fi
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/php-fpm-launcher"
+ fi
+}
diff --git a/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild b/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild
new file mode 100644
index 00000000..d6eceda5
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-php/eselect-php-0.7.1-r4.ebuild,v 1.3 2015/04/19 08:56:26 ago Exp $
+
+EAPI=5
+
+inherit depend.apache systemd
+
+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 ~arm64 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 systemd"
+
+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-r1" \
+ "70_mod_php5.conf"
+ fi
+
+ if use fpm ; then
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm-r1.init" "php-fpm"
+ if use systemd ; then
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ fi
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/php-fpm-launcher"
+ fi
+}
diff --git a/app-eselect/eselect-php/files/70_mod_php5.conf-apache2 b/app-eselect/eselect-php/files/70_mod_php5.conf-apache2
new file mode 100644
index 00000000..7ec8739c
--- /dev/null
+++ b/app-eselect/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-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1 b/app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1
new file mode 100644
index 00000000..05deeb6e
--- /dev/null
+++ b/app-eselect/eselect-php/files/70_mod_php5.conf-apache2-r1
@@ -0,0 +1,18 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ # NOTE: Avoiding AddHandler/AddType for security (bug #538822)
+ # NOTE: Please read the related news item!
+ <FilesMatch "\.(php|php5|phtml)$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+
+ DirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/app-eselect/eselect-php/files/php-fpm-launcher b/app-eselect/eselect-php/files/php-fpm-launcher
new file mode 100644
index 00000000..7a1c1c9f
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PHPSLOT="${1}"
+[ -z "${PHPSLOT}" ] && PHPSLOT="$(eselect php show fpm)"
+shift
+
+exec /usr/lib/${PHPSLOT}/bin/php-fpm "${@}"
diff --git a/app-eselect/eselect-php/files/php-fpm-r1.init b/app-eselect/eselect-php/files/php-fpm-r1.init
new file mode 100755
index 00000000..ab0693ec
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-r1.init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+
+set_phpvars() {
+ PHPSLOT=${SVCNAME#php-fpm-}
+ PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid"
+ if [ ${PHPSLOT} = 'php-fpm' ] ; then
+ PHPSLOT="$(eselect php show fpm)"
+ PHP_FPM_PID="/var/run/php-fpm.pid"
+ fi
+
+ PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
+}
+
+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-eselect/eselect-php/files/php-fpm.conf b/app-eselect/eselect-php/files/php-fpm.conf
new file mode 100644
index 00000000..d7ad9654
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm.conf
@@ -0,0 +1 @@
+d /var/run/php-fpm 755 root root
diff --git a/app-eselect/eselect-php/files/php-fpm_at.service b/app-eselect/eselect-php/files/php-fpm_at.service
new file mode 100644
index 00000000..cba3321c
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm_at.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=notify
+PIDFile=/var/run/php-fpm/php-fpm-%I.pid
+ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
+