php8.2: for apache config

This commit is contained in:
Đoàn Trần Công Danh 2024-01-02 20:42:26 +07:00 committed by Đoàn Trần Công Danh
parent f12a362cee
commit 30cd82dcfa
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Required modules: dir_module, php8.2_module # Required modules: dir_module, php_module
<IfModule dir_module> <IfModule dir_module>
<IfModule php8.2_module> <IfModule php_module>
DirectoryIndex index.php index.html DirectoryIndex index.php index.html
<FilesMatch "\.php$"> <FilesMatch "\.php$">
SetHandler application/x-httpd-php SetHandler application/x-httpd-php

View File

@ -1,7 +1,7 @@
# Template file for 'php8.2' # Template file for 'php8.2'
pkgname=php8.2 pkgname=php8.2
version=8.2.13 version=8.2.13
revision=2 revision=3
_php_version=8.2 _php_version=8.2
hostmakedepends="bison pkg-config apache-devel" hostmakedepends="bison pkg-config apache-devel"
makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel makedepends="apache-devel enchant2-devel freetds-devel freetype-devel gdbm-devel
@ -200,6 +200,9 @@ php8.2-apache_package() {
short_desc+=' - Apache SAPI' short_desc+=' - Apache SAPI'
depends="php${_php_version}>=${version}_${revision}" depends="php${_php_version}>=${version}_${revision}"
conf_files="/etc/apache/extra/php${_php_version}_module.conf" conf_files="/etc/apache/extra/php${_php_version}_module.conf"
alternatives="
php-apache:libphp.so:/usr/libexec/httpd/modules/libphp${_php_version}.so
php-apache:php_module.conf:/etc/apache/extra/php${_php_version}_module.conf"
pkg_install() { pkg_install() {
vinstall ${wrksrc}/build-apache/libs/libphp.so 755 usr/libexec/httpd/modules "libphp${_php_version}.so" vinstall ${wrksrc}/build-apache/libs/libphp.so 755 usr/libexec/httpd/modules "libphp${_php_version}.so"
vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra "php${_php_version}_module.conf" vinstall ${FILESDIR}/apache.conf 644 etc/apache/extra "php${_php_version}_module.conf"