Files
ceamac-overlay/app-eselect/eselect-php/eselect-php-2.ebuild

51 lines
1.0 KiB
Bash

# 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
}