m6w6/pharext

将 PHP 扩展打包成自安装的 PHAR

安装: 93

依赖者: 0

建议者: 0

安全: 0

星标: 59

关注者: 4

分支: 1

开放问题: 0

类型:项目

v4.1.4 2021-01-15 13:28 UTC

This package is auto-updated.

Last update: 2024-08-29 03:20:57 UTC


README

Join the chat at https://gitter.im/pharext/pharext

分发您的 PHP 扩展为可自安装的 PHAR 可执行文件。请参阅 https://pharext.org

关于

您不需要此软件包来安装任何 *.ext.phar 扩展包,只需用 php 运行它们即可

$ ./pecl_http-2.4.2.ext.phar

对于压缩的 PHAR 或执行权限位丢失的情况

$ php pecl_http-2.4.2.ext.phar.gz

命令帮助

$ ./pecl_http-2.4.2.ext.phar -h

输出

pharext v3.0.0 (c) Michael Wallner <mike@php.net>

Usage:

$ ./pecl_http-2.4.2.ext.phar [-hvqs] [-p|-n|-c|-i <arg>]

  -h|--help                                  Display help
  -v|--verbose                               More output
  -q|--quiet                                 Less output
  -p|--prefix <arg>                          PHP installation prefix if phpize is not in $PATH, e.g. /opt/php7
  -n|--common-name <arg>                     PHP common program name, e.g. php5 or zts-php [php]
  -c|--configure <arg>                       Additional extension configure flags, e.g. -c --with-flag
  -s|--sudo [<arg>]                          Installation might need increased privileges [sudo -S %s]
  -i|--ini <arg>                             Activate in this php.ini instead of loaded default php.ini
  --signature                                Show package signature
  --license                                  Show package license
  --name                                     Show package name
  --date                                     Show package release date
  --release                                  Show package release version
  --version                                  Show pharext version
  --enable-propro [<arg>]                    Whether to enable property proxy support [yes]
  --enable-raphf [<arg>]                     Whether to enable raphf support [yes]
  --with-http-zlib-dir [<arg>]               Where to find zlib [/usr]
  --with-http-libcurl-dir [<arg>]            Where to find libcurl [/usr]
  --with-http-libevent-dir [<arg>]           Where to find libevent [/usr]

如果您的安装目标需要提升权限,请参阅 --sudo 选项

Installing propro-1.0.1.ext.phar ...
Running phpize ...
Running configure ...
Running make ...
Running make install ...
Running INI activation ...
Extension already activated ...
Successfully installed propro-1.0.1.ext.phar!
Installing raphf-1.0.5.ext.phar ...
Running phpize ...
Running configure ...
Running make ...
Running make install ...
Running INI activation ...
Extension already activated ...
Successfully installed raphf-1.0.5.ext.phar!
Installing pecl_http-2.4.2.ext.phar ...
Running phpize ...
Running configure ...
Running make ...
Running make install ...
Running INI activation ...
Extension already activated ...
Successfully installed pecl_http-2.4.2.ext.phar!

先决条件

构建 PHP 扩展所需的常用工具

  • php, phpize 和 php-config
  • make, cc 和 autotools

不需要网络连接。

扩展维护者

下载最新发布版本的 pharext 二进制文件 https://github.com/pharext/pharext/releases/latest

请注意,您需要 公钥 来运行官方 pharext 发布版。

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5x9bwisjDBDV/bwDiju2
Ebx4kPir32WwT3+hxV0/qAPclA1WsrpcUJ7BChk+Rlz8ujOcyENTidgI1vj3oUpo
/P9XlLQOSrJHYz+AOg7qwhTe89xIJspS4gHHiXUAmxz0TyCNMbOyrLcjP5CmZdll
n+e3HP8Kfipr4XyWBhsKbdYUZ8Ga6IeFMYzNqCzWazcOasdCpsablmyrfCaZoJ0l
bFald0nF3/YoeYgo3fWb4Md9Xf/grpz8Ocqyq4OY49Vb0/p8FMwzBV6vbVh/eAV/
jrP7L40Jw97nSBrP/5nK8Ylc5BayVRq/HhT3kLMC//zvPjb8xz3ZgVTQrwWTF3Zy
+wIDAQAB
-----END PUBLIC KEY-----

将其放置在 pharext.pubkey,与 pharext 二进制文件相同的目录中。如果您已克隆了存储库或通过 composer 安装了 pharext,它已经在正确的位置。

请参阅 wiki,了解如何使用 pharext 安装程序打包自安装的 PHP 扩展。