summaryrefslogtreecommitdiff
path: root/app-eselect/eselect-php
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-eselect/eselect-php
reinit the tree, so we can have metadata
Diffstat (limited to 'app-eselect/eselect-php')
-rw-r--r--app-eselect/eselect-php/Manifest12
-rw-r--r--app-eselect/eselect-php/eselect-php-0.9.2.ebuild60
-rw-r--r--app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild66
-rw-r--r--app-eselect/eselect-php/eselect-php-9999.ebuild71
-rw-r--r--app-eselect/eselect-php/files/70_mod_php5.backcompat.conf28
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher7
-rw-r--r--app-eselect/eselect-php/files/php-fpm-launcher-r213
-rw-r--r--app-eselect/eselect-php/files/php-fpm.conf1
-rw-r--r--app-eselect/eselect-php/metadata.xml13
9 files changed, 271 insertions, 0 deletions
diff --git a/app-eselect/eselect-php/Manifest b/app-eselect/eselect-php/Manifest
new file mode 100644
index 000000000000..1da12e2ac65c
--- /dev/null
+++ b/app-eselect/eselect-php/Manifest
@@ -0,0 +1,12 @@
+AUX 70_mod_php5.backcompat.conf 850 SHA256 8a5c1ee10b2ac49bec3299c2cff4e1cd0c75e4407e1a5212f5c872d45c67c1f5 SHA512 eac982be5e48bab849a9b0ec11a336234daf450c7feb8d8955159108f1dfa7a91013b8b2e2c3eb39dbb8d90aa6e21877a7d955598592c40735b10ec9e8f15cad WHIRLPOOL ef0c4d04ec8316c494b746c5e505faf530dd8773983cb28f98b7ea0fa76addd6b76b601536cfa6db674d22d3474e57f8cfffa03b9d01373f0b3fd74c18553b15
+AUX php-fpm-launcher 134 SHA256 d7e944a016a8a282b9a684de1820c8e5c00791c27471a528b1ee8dc620eb83e8 SHA512 4304ea6df7093af06f1b7df5bf5d8ed7692403cc64a5c4c516e49d36fa866b33e4815876d28cc365f5ccb1e301ef7ce9b57e15ed959a41c91fb25af7236fed29 WHIRLPOOL f6123fb338a10e23f21616ab1bbfa385289748cff9523c2a1d39e82f53f104eacc0f3b088794a12b678551b7d8ef1b6262480882b62ce38067e923e7592b4629
+AUX php-fpm-launcher-r2 256 SHA256 9e51978f50824d59c777289c47b07dcbac36f3c961c5a7c95dc94104fe900226 SHA512 9d2cccf40cbb515fa3c232e525b6b3a8b3459917ecaaf6b133f321e5ad040047c12720f60007f524c3d8ee6430f0b29ac5048fde7059ab506c14289c23825953 WHIRLPOOL a14d793a1e7c3d9d4d77a9f98c13d2758cd4665498336b479b4a449879fa504a848bedb00eba118105f55d5d635ea24e2911ab0aec0474075a5db013a7445cae
+AUX php-fpm.conf 29 SHA256 640dba0d960bfeaae9ad38d2826d3f6b5d6c175a4d3e16664eefff29141faad5 SHA512 824e9a0d10063283357d49a81ab49bf834afd24f098482bdbaa9ab60bbad2b0dea6f5879259b73717d437626b02fb4f2d3ef68b7bcbb26bee274a7b61144720f WHIRLPOOL 0979fc3fc9e2ac53fef2f5efa9de745b9e97aeccfd045e23778a4e7bd8f8bc0a69d19fcbccb482cc210e6cb291ff9c6150c2b73fbc20991c64d1990c735366e9
+DIST eselect-php-0.9.2.tar.xz 48356 SHA256 8b2acfccb3d2e3d7cad137fc4306711371ebd544cbcdad8e9d46c5dacf8ed889 SHA512 ebf4c9039aaa3ffad79dee181b5cd77f144a4b1b49d80291b290377b7ca5a9618d8b18922f0624e646c4d80266c58199bb936a7b8dd5d2e2bdc296099f583edf WHIRLPOOL 5ca0673a80b5e88522ff1ca82c4b4f842a63439cd47562c72048a4d66dc88d2dcc7070c28c0b8ff50a75bdb1a9056ee5391b37f4dc34cc9eda3652c6791a276c
+DIST eselect-php-0.9.4.tar.xz 49576 SHA256 44c5966a2c7f0a052f77f780995d658cecf2407b928e31e99ac810c16c7c1a95 SHA512 2ba1dd75d4bb9611c6687ed4449f715728263538f772652aa1ac013103cf9ddf328c854326cf6da4f9b3ff2279bf99d973325520fe8b4e3ba7a76a9c3264e78e WHIRLPOOL cd743fd8a99955e03ec9693e83fb808b6c048e04b8609f1a12be22cdcbfc4d6fd28fa5e66e74f1ef665d6366e9bb53120fcf91a088095fe7386549b6fb3bbff1
+EBUILD eselect-php-0.9.2.ebuild 1956 SHA256 c1cd1ae5488a3e1068faff2a2242e40d9432996c65d9291d0eb7eb7141112f36 SHA512 5ae4cb205892103b1ccbd809d07f46ebcb64587663ca4bddb47bc194992f8b208b41852cd3d639421fd9c14fc070df083b44017bfa68f09c06e3865bd04416a5 WHIRLPOOL e00f5ec4ce305d9562e86f5939eab6adc34dad1016cb99025dea21cd695b94178deb9ed904c159b1365dc9b69facb18a9d135dd4deb5cb79c83a841230829070
+EBUILD eselect-php-0.9.4-r2.ebuild 2138 SHA256 7d3f38d50cb569604f24028086e5a89b090c162c82193de950658638f5456227 SHA512 021aea60fdbef4a46459f64f6c5f06834a4506c21d5d39019a7d0e17e9d956da6d1b64838416022d6d8d257c0a519a7440a69f242770a398c8cb6238748e8924 WHIRLPOOL fb70d41e27e824bce0ce5e870314f6dd9aa3d02e41ccfb0410e4fd39016b6fef79d137202ffb04040ece704646b294705dd70e4ecf89ddaba941a8f91e6f1e32
+EBUILD eselect-php-9999.ebuild 2052 SHA256 1f1c0f2e7dcab851455141b6ef5254400fd01db0b204e4b0dab412f87560762b SHA512 bd9dcbf30df9f9788b93a2835efe15210354f3afdf53b7efbc51508ff5621c21a463a997099736d3d989dd6fdd9921d313008f1d18790df6609222f5a4700c23 WHIRLPOOL 3f2cc0166fa51dfbb22380c990517a1b8f1f5882c10be703ac21cbea483ff15f5e7acb69f547d34f23a81bc02c50963997d7463c9781193a2895fc01401f95a6
+MISC ChangeLog 12923 SHA256 2bf1eefbe1c65ca3d0bfa5aad878e74f8ecb6b4748b3dc9aa0716f8175c631b8 SHA512 e2fd59f34fa15d898ebbe4e538e68dd8378200d073e1e98bae96c2ae14f3ee32c469851f39f5f9d95aeffa09932a26956f05ac8b2b6f46afc3433d61b9324222 WHIRLPOOL 94484b317e0a5084f28db441382b46632a3bb3274e9bcb2bead8342a6d329de09d01a948b557c8fec0f5686e7776667d47e4619e25234d17bb26fae92aa8f5d6
+MISC ChangeLog-2015 9793 SHA256 34a312c6879a62e1ef1e014dcb7ed39e4c4b7b5a25673a37da2a316c6594f2d4 SHA512 9dbd821886a7ab86c0196a0ccd855bb483c620f01ac2ea4705c3e4297f4970071f66006e293182181a3365b044bedca70eeaef4d33caf25986c33dc71aa74267 WHIRLPOOL 7ad5e2b282e9d845a05b5b225c4afe68728360016219a00292b9f16e3595e112555ce0bf604a7c6edef302ba6598ca229d8aa9eb9392c046fc1227a105ea7ec9
+MISC metadata.xml 387 SHA256 fdc96f369aa373454f8c06dce987092169bf218f49d44e57cfb343a8725e48ce SHA512 80a043e0836a1ac58120f1471e997face2f60117e3a83d490ad259a05cfdc39098c457573e3550c9fc3a7712f28b9faacd427c076e8f46ed3476e42f58f8f1b5 WHIRLPOOL d1c2ba87ec73d3bcf9d4be46e184b1852e34aaa4e2e4a6f497ecef4d321a134ae7e3104c3ee17931b1b1d2d9387323489b04b0094d3040468b72adccc925099f
diff --git a/app-eselect/eselect-php/eselect-php-0.9.2.ebuild b/app-eselect/eselect-php/eselect-php-0.9.2.ebuild
new file mode 100644
index 000000000000..62d088911422
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.9.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="PHP eselect module"
+HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
+SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="fpm apache2"
+
+# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
+RDEPEND="app-admin/eselect
+ apache2? ( www-servers/apache[apache2_modules_dir] )"
+
+src_configure(){
+ # We expect localstatedir to be "var"ish, not "var/lib"ish, because
+ # that's what PHP upstream expects. See for example the FPM
+ # configuration where they put logs in @localstatedir@/log.
+ econf --localstatedir="${EPREFIX}"/var $(use_enable apache2)
+}
+
+src_install() {
+ default
+
+ # This can be removed after a while...
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
+ fi
+
+ if use fpm ; then
+ newinitd "doc/php-fpm.example.init" "php-fpm"
+ newconfd "doc/php-fpm.example.conf" "php-fpm"
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ exeinto /usr/libexec
+ doexe "${FILESDIR}/php-fpm-launcher"
+ fi
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ elog
+ elog "If you are upgrading, be warned that our mod_php configuration"
+ elog "file has changed! You should now define -DPHP for the apache2"
+ elog "daemon, and inspect the new 70_mod_php.conf which has been"
+ elog "installed. Module loading involves eselect as of this version."
+ elog
+ elog "You must run eselect at least once to choose your apache2 target"
+ elog "before the new configuration will work. Afterwards, and after you"
+ elog "have reviewed your new configuration, you are advised to remove"
+ elog "the obsolete 70_mod_php5.conf file."
+ elog
+ fi
+}
diff --git a/app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild
new file mode 100644
index 000000000000..4dec17a54184
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-0.9.4-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+DESCRIPTION="PHP eselect module"
+HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
+SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="fpm apache2"
+
+# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
+RDEPEND="app-admin/eselect
+ apache2? ( www-servers/apache[apache2_modules_dir] )
+ fpm? ( sys-apps/gentoo-functions )"
+
+src_configure(){
+ # We expect localstatedir to be "var"ish, not "var/lib"ish, because
+ # that's what PHP upstream expects. See for example the FPM
+ # configuration where they put logs in @localstatedir@/log.
+ #
+ # The libdir is passed explicitly in case the /usr/lib symlink
+ # is not present (bug 624528).
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --localstatedir="${EPREFIX}/var" \
+ --with-piddir="${EPREFIX}/run" \
+ $(use_enable apache2) \
+ $(use_enable fpm)
+}
+
+src_install() {
+ default
+
+ # This can be removed after a while...
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
+ fi
+
+ if use fpm ; then
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ exeinto /usr/libexec
+ newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
+ fi
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ elog
+ elog "If you are upgrading, be warned that our mod_php configuration"
+ elog "file has changed! You should now define -DPHP for the apache2"
+ elog "daemon, and inspect the new 70_mod_php.conf which has been"
+ elog "installed. Module loading involves eselect as of this version."
+ elog
+ elog "You must run eselect at least once to choose your apache2 target"
+ elog "before the new configuration will work. Afterwards, and after you"
+ elog "have reviewed your new configuration, you are advised to remove"
+ elog "the obsolete 70_mod_php5.conf file."
+ elog
+ fi
+}
diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild
new file mode 100644
index 000000000000..f695558d423a
--- /dev/null
+++ b/app-eselect/eselect-php/eselect-php-9999.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd git-r3 autotools
+
+DESCRIPTION="PHP eselect module"
+HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
+EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect-php.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="fpm apache2"
+
+# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
+RDEPEND="app-admin/eselect
+ apache2? ( www-servers/apache[apache2_modules_dir] )
+ fpm? ( sys-apps/gentoo-functions )"
+
+src_prepare() {
+ eapply_user
+ eautoreconf
+}
+
+src_configure(){
+ # We expect localstatedir to be "var"ish, not "var/lib"ish, because
+ # that's what PHP upstream expects. See for example the FPM
+ # configuration where they put logs in @localstatedir@/log.
+ #
+ # The libdir is passed explicitly in case the /usr/lib symlink
+ # is not present (bug 624528).
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --localstatedir="${EPREFIX}/var" \
+ --with-piddir="${EPREFIX}/run" \
+ $(use_enable apache2) \
+ $(use_enable fpm)
+}
+
+src_install() {
+ default
+
+ # This can be removed after a while...
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ newins "${FILESDIR}/70_mod_php5.backcompat.conf" 70_mod_php5.conf
+ fi
+
+ if use fpm ; then
+ systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
+ exeinto /usr/libexec
+ newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher
+ fi
+}
+
+pkg_postinst() {
+ if use apache2 ; then
+ elog
+ elog "If you are upgrading, be warned that our mod_php configuration"
+ elog "file has changed! You should now define -DPHP for the apache2"
+ elog "daemon, and inspect the new 70_mod_php.conf which has been"
+ elog "installed. Module loading involves eselect as of this version."
+ elog
+ elog "You must run eselect at least once to choose your apache2 target"
+ elog "before the new configuration will work. Afterwards, and after you"
+ elog "have reviewed your new configuration, you are advised to remove"
+ elog "the obsolete 70_mod_php5.conf file."
+ elog
+ fi
+}
diff --git a/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
new file mode 100644
index 000000000000..bd79f78aa6be
--- /dev/null
+++ b/app-eselect/eselect-php/files/70_mod_php5.backcompat.conf
@@ -0,0 +1,28 @@
+###########
+# WARNING #
+###########
+#
+# This file is provided for backwards compatibility only. The Apache
+# PHP configuration is now located in 70_mod_php.conf and requires you
+# to set -DPHP in your Apache conf.d file. Please examine
+# 70_mod_php.conf and update your Apache configuration to use -DPHP
+# instead of -DPHP5. Afterwards you may delete this file.
+#
+<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 000000000000..7a1c1c9f918b
--- /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-launcher-r2 b/app-eselect/eselect-php/files/php-fpm-launcher-r2
new file mode 100644
index 000000000000..3a6b2720fa67
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r2
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. /lib/gentoo/functions.sh
+
+# If there are no arguments, then "shift" will fail (bug 626496).
+if [ $# -eq 0 ]; then
+ PHP_SLOT=$(eselect php show fpm)
+else
+ PHP_SLOT=$1
+ shift
+fi
+
+exec "/usr/$(get_libdir)/${PHP_SLOT}/bin/php-fpm" "${@}"
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 000000000000..801e74f1e620
--- /dev/null
+++ b/app-eselect/eselect-php/files/php-fpm.conf
@@ -0,0 +1 @@
+d /run/php-fpm 755 root root
diff --git a/app-eselect/eselect-php/metadata.xml b/app-eselect/eselect-php/metadata.xml
new file mode 100644
index 000000000000..be945bac7771
--- /dev/null
+++ b/app-eselect/eselect-php/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>php-bugs@gentoo.org</email>
+ <name>PHP</name>
+ </maintainer>
+ <longdescription lang="en">PHP eselect module
+ </longdescription>
+ <use>
+ <flag name="fpm">Enable the FastCGI Process Manager SAPI</flag>
+ </use>
+</pkgmetadata>