diff options
author | fhajny <fhajny@pkgsrc.org> | 2012-02-22 10:43:42 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2012-02-22 10:43:42 +0000 |
commit | 90ecf63e766aad1e33718a4b13cdcc6d9b07e37b (patch) | |
tree | b5fcb16375b731672d0ff8f4f41392ed00833eff /www | |
parent | 317c94c8ca577c0269a5ace6e163eb82e73ccba4 (diff) | |
download | pkgsrc-90ecf63e766aad1e33718a4b13cdcc6d9b07e37b.tar.gz |
Import php53-fpm-5.3.10 as www/php-fpm.
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
implementation with some additional features useful for sites
of any size, especially busier sites.
These features include:
* Adaptive process spawning (NEW!)
* Basic statistics (ala Apache's mod_status) (NEW!)
* Advanced process management with graceful stop/start
* Ability to start workers with different uid/gid/chroot/environment
and different php.ini (replaces safe_mode)
* Stdout & stderr logging
* Emergency restart in case of accidental opcode cache destruction
* Accelerated upload support
* Support for a "slowlog"
* Enhancements to FastCGI, such as fastcgi_finish_request() - a special
function to finish request & flush all data while continuing to do
something time-consuming (video converting, stats processing, etc.)
... and much more.
It was not designed with virtual hosting in mind (large amounts of pools)
however it can be adapted for any usage model.
Diffstat (limited to 'www')
-rw-r--r-- | www/php-fpm/DESCR | 23 | ||||
-rw-r--r-- | www/php-fpm/MESSAGE | 11 | ||||
-rw-r--r-- | www/php-fpm/Makefile | 41 | ||||
-rw-r--r-- | www/php-fpm/PLIST | 6 | ||||
-rwxr-xr-x | www/php-fpm/files/php_fpm.sh | 19 |
5 files changed, 100 insertions, 0 deletions
diff --git a/www/php-fpm/DESCR b/www/php-fpm/DESCR new file mode 100644 index 00000000000..d0d742ebab9 --- /dev/null +++ b/www/php-fpm/DESCR @@ -0,0 +1,23 @@ +PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI +implementation with some additional features useful for sites +of any size, especially busier sites. + +These features include: + +* Adaptive process spawning (NEW!) +* Basic statistics (ala Apache's mod_status) (NEW!) +* Advanced process management with graceful stop/start +* Ability to start workers with different uid/gid/chroot/environment + and different php.ini (replaces safe_mode) +* Stdout & stderr logging +* Emergency restart in case of accidental opcode cache destruction +* Accelerated upload support +* Support for a "slowlog" +* Enhancements to FastCGI, such as fastcgi_finish_request() - a special + function to finish request & flush all data while continuing to do + something time-consuming (video converting, stats processing, etc.) + +... and much more. + +It was not designed with virtual hosting in mind (large amounts of pools) +however it can be adapted for any usage model. diff --git a/www/php-fpm/MESSAGE b/www/php-fpm/MESSAGE new file mode 100644 index 00000000000..01b7baa78b5 --- /dev/null +++ b/www/php-fpm/MESSAGE @@ -0,0 +1,11 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2012/02/22 10:43:42 fhajny Exp $ + +For more information about PHP FastCGI Process Manager see FPM wiki at: +http://php-fpm.org/wiki/Main_Page + +For NetBSD consider adding something like following to /etc/newsyslog.conf: + +${VARBASE}/log/php-fpm.log 640 7 * * BZ ${VARBASE}/run/php-fpm.pid SIGUSR1 + +=========================================================================== diff --git a/www/php-fpm/Makefile b/www/php-fpm/Makefile new file mode 100644 index 00000000000..664dd13373c --- /dev/null +++ b/www/php-fpm/Makefile @@ -0,0 +1,41 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/02/22 10:43:42 fhajny Exp $ + +PKGNAME= ${PHP_PKG_PREFIX}-fpm-${PHP_BASE_VERS} +CATEGORIES= www + +HOMEPAGE= http://php-fpm.org/ +MAINTAINER= filip@joyent.com +COMMENT= FPM interface for ${PKG_PHP} +LICENSE= 2-clause-bsd + +PHP_VERSIONS_ACCEPTED= 53 + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_PHP_EXT_PATCHES= yes + +BUILD_DEFS+= VARBASE APACHE_USER APACHE_GROUP + +EGDIR= ${PREFIX}/share/examples/php +CONF_FILES= ${EGDIR}/php-fpm.conf ${PKG_SYSCONFDIR}/php-fpm.conf +AUTO_MKDIRS= yes + +CONFIGURE_ARGS+= --enable-fpm +CONFIGURE_ARGS+= --with-libevent-dir=${BUILDLINK_PREFIX.libevent} +CONFIGURE_ARGS+= --with-fpm-user=${APACHE_USER} +CONFIGURE_ARGS+= --with-fpm-group=${APACHE_GROUP} + +RCD_SCRIPTS= php_fpm +MESSAGE_SUBST+= CGIDIR=${CGIDIR:Q} +MESSAGE_SUBST+= VARBASE=${VARBASE:Q} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sapi/fpm/php-fpm ${DESTDIR}${PREFIX}/sbin/php-fpm + ${INSTALL_MAN} ${WRKSRC}/sapi/fpm/php-fpm.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/ + ${INSTALL_DATA} ${WRKSRC}/sapi/fpm/php-fpm.conf ${DESTDIR}${EGDIR} + +.include "../../devel/libevent/buildlink3.mk" +.include "../../lang/php/phpversion.mk" +.include "${PHPPKGSRCDIR}/Makefile.php" +.include "${PHPPKGSRCDIR}/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/www/php-fpm/PLIST b/www/php-fpm/PLIST new file mode 100644 index 00000000000..098bf1732e8 --- /dev/null +++ b/www/php-fpm/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/02/22 10:43:42 fhajny Exp $ +man/man8/php-fpm.8 +sbin/php-fpm +share/examples/php/php-fpm.conf +share/examples/rc.d/php_fpm +@pkgdir share/examples/php diff --git a/www/php-fpm/files/php_fpm.sh b/www/php-fpm/files/php_fpm.sh new file mode 100755 index 00000000000..ab0dff7130e --- /dev/null +++ b/www/php-fpm/files/php_fpm.sh @@ -0,0 +1,19 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: php_fpm.sh,v 1.1.1.1 2012/02/22 10:43:42 fhajny Exp $ +# +# PROVIDE: php_fpm +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="php_fpm" +rcvar=${name} +command="@PREFIX@/sbin/php-fpm" +required_files="@PKG_SYSCONFDIR@/php-fpm.conf" +pidfile="@VARBASE@/run/php-fpm.pid" +sig_reload="USR2" +extra_commands="reload" + +load_rc_config $name +run_rc_command "$1" |