tkurbad-overlay/dev-php/php-pm/php-pm-2.4.0.ebuild

92 lines
2.7 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="PHP-PM is a process manager, supercharger and load balancer for PHP applications."
HOMEPAGE="https://github.com/php-pm/php-pm"
SRC_URI="https://github.com/php-pm/php-pm/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/php-pm-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
BDEPEND="dev-php/theseer-Autoload"
RDEPEND="
>=dev-lang/php-7.4:*
dev-php/fedora-autoloader
dev-php/psr-http-message
dev-php/psr-http-server-handler
dev-php/react-child-process
dev-php/react-event-loop
dev-php/react-http
dev-php/react-promise
dev-php/react-socket
dev-php/react-stream
dev-php/ringcentral-psr7
dev-php/symfony-console
dev-php/symfony-error-handler
dev-php/symfony-process
"
src_prepare() {
default
phpab \
--quiet \
--output autoload.php \
--template fedora2 \
--basedir src \
src \
|| die
VENDOR_DIR="${EPREFIX}/usr/share/php"
cat >> autoload.php <<EOF || die "failed to extend autoload.php"
// Dependencies
\Fedora\Autoloader\Dependencies::required([
"${VENDOR_DIR}/Fedora/Autoloader/autoload.php",
"${VENDOR_DIR}/Evenement/autoload.php",
"${VENDOR_DIR}/Fig/Http/Message/autoload.php",
"${VENDOR_DIR}/Psr/Container/autoload.php",
"${VENDOR_DIR}/Psr/Http/Message/autoload.php",
"${VENDOR_DIR}/Psr/Http/Server/autoload.php",
"${VENDOR_DIR}/Psr/Log/autoload.php",
"${VENDOR_DIR}/React/Cache/autoload.php",
"${VENDOR_DIR}/React/ChildProcess/autoload.php",
"${VENDOR_DIR}/React/Dns/autoload.php",
"${VENDOR_DIR}/React/EventLoop/autoload.php",
"${VENDOR_DIR}/React/Http/autoload.php",
"${VENDOR_DIR}/React/Promise/autoload.php",
"${VENDOR_DIR}/React/Socket/autoload.php",
"${VENDOR_DIR}/React/Stream/autoload.php",
"${VENDOR_DIR}/RingCentral/Psr7/autoload.php",
"${VENDOR_DIR}/Symfony/Component/Console/autoload.php",
"${VENDOR_DIR}/Symfony/Component/DeprecationContracts/autoload.php",
"${VENDOR_DIR}/Symfony/Component/ErrorHandler/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Ctype/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Intl/Grapheme/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Intl/Normalizer/autoload.php",
"${VENDOR_DIR}/Symfony/Polyfill/Mbstring/autoload.php",
"${VENDOR_DIR}/Symfony/Component/Process/autoload.php",
"${VENDOR_DIR}/Symfony/Contracts/Service/autoload.php",
"${VENDOR_DIR}/Symfony/Component/String/autoload.php",
"${VENDOR_DIR}/Symfony/Component/VarDumper/autoload.php"
]);
EOF
echo "require_once __DIR__ . \"/src/functions.php\";" >> autoload.php
}
src_install() {
insinto "/usr/share/php/PHPPM"
doins -r *.php LICENSE bin src/*
exeinto "/usr/share/php/PHPPM/bin"
doexe "bin/ppm"
dosym "/usr/share/php/PHPPM/bin/ppm" "/usr/bin/ppm"
}