app-eselect/eselect-php: new package, add 2

This commit is contained in:
2026-01-23 14:50:43 +02:00
parent 85c27068a0
commit 10f08799f6
2 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
TMPFILES_OPTIONAL="yes"
inherit tmpfiles
DESCRIPTION="Gentoo config file for missing eselect-php"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
S="${WORKDIR}"
LICENSE="GPL-2+"
SLOT="ceamac"
KEYWORDS="~amd64"
IUSE="fpm apache2"
RESTRICT="bindist"
RDEPEND="fpm? ( virtual/tmpfiles )"
BDEPEND="app-eselect/eselect-php:0[fpm?,apache2?]"
pkg_setup() {
[[ ${ROOT} != ${BROOT} ]] && export COPYFILES=1
}
src_install() {
if [[ -n ${COPYFILES} ]]; then
local files_to_copy=(
/etc/apache2/modules.d/70_mod_php.conf
/etc/conf.d/php-fpm
/etc/init.d/php-fpm
/etc/logrotate.d/php-fpm.logrotate
/usr/lib/tmpfiles.d/php-fpm.conf
/usr/libexec/php-fpm-launcher
)
local i
for i in "${files_to_copy[@]}"; do
if [[ -e "${BROOT}"/"${i}" ]]; then
dodir "$(dirname "${i}")"
cp -p "${BROOT}"/"${i}" "${ED}"/"${i}" || die
fi
done
fi
}
pkg_postinst() {
use fpm && tmpfiles_process php-fpm.conf
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ceamac@gentoo.org</email>
<name>Viorel Munteanu</name>
</maintainer>
<use>
<flag name="fpm">Enable the FastCGI Process Manager SAPI</flag>
</use>
<stabilize-allarches/>
</pkgmetadata>