app-eselect/eselect-php: new package, add 2
This commit is contained in:
50
app-eselect/eselect-php/eselect-php-2.ebuild
Normal file
50
app-eselect/eselect-php/eselect-php-2.ebuild
Normal 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
|
||||
}
|
||||
12
app-eselect/eselect-php/metadata.xml
Normal file
12
app-eselect/eselect-php/metadata.xml
Normal 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>
|
||||
Reference in New Issue
Block a user