3 Distribute your PHP extension as self-installable phar executable
9 You don't need this package to install any `*.ext.phar` extension packages,
10 just run them with php:
12 $ ./pecl_http-2.4.0dev.ext.phar
14 Or, if the execute permission bit got lost somehow:
16 $ php pecl_http-2.4.0dev.ext.phar
20 $ ./pecl_http-2.4.0dev.ext.phar -h
26 $ ./pecl_http-2.4.0dev.ext.phar [-h|-v|-q|-s] [-p|-n|-c <arg>]
28 -h|--help Display help
29 -v|--verbose More output
30 -q|--quiet Less output
31 -p|--prefix <arg> PHP installation directory [/usr]
32 -n|--common-name <arg> PHP common program name, e.g. php5 [php]
33 -c|--configure <arg> Additional extension configure flags
34 -s|--sudo [<arg>] Installation might need increased privileges [sudo -S %s]
36 If your installation destination needs escalated permissions, have a look at the `--sudo` option:
38 $ ./pecl_http-2.4.0dev.ext.phar --sudo
40 Running configure ... OK
42 Running install ... Password:············
43 Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20121212/
44 Installing header files: /usr/include/php/
49 The usual tools you need to build a PHP extension:
50 * php, phpize and php-config
51 * make, cc and autotools
53 A network connection is not needed.
58 * Package description files
60 ## Download for extension maintainers
62 Download the pharext binary of the [latest release](https://github.com/m6w6/pharext/releases/latest).
64 ## Installation for extension maintainers
66 $ composer require --dev m6w6/pharext
75 $ ./vendor/bin/pharext --pecl --source ../pecl_http.git
79 Creating phar ./pecl_http-2.4.0dev.ext.phar.54f6e987ae00f.tmp ... OK
80 Finalizing ./pecl_http-2.4.0dev.ext.phar ... OK
82 Note that the PECL source can infer package name and release version from the package.xml.
84 Another example using `git ls-files`:
86 $ ./vendor/bin/pharext -v -g -s ../raphf.git --name raphf --release 1.0.5
90 Creating phar ./raphf-1.0.5.ext.phar.54f6ebd71f13b.tmp ...
100 Packaging php_raphf.h
102 Packaging tests/http001.phpt
103 Packaging tests/http002.phpt
104 Packaging tests/http003.phpt
105 Packaging tests/http004.phpt
107 Finalizing ./raphf-1.0.5.ext.phar ... OK
111 $ ./vendor/bin/pharext --help
117 $ ./vendor/bin/pharext [-h|-v|-q|-g|-p] -s <arg> -n <arg> -r <arg> [-d <arg>]
119 -h|--help Display this help
120 -v|--verbose More output
121 -q|--quiet Less output
122 -s|--source <arg> Extension source directory (REQUIRED)
123 -g|--git Use `git ls-files` instead of the standard ignore filter
124 -p|--pecl Use PECL package.xml instead of the standard ignore filter
125 -d|--dest <arg> Destination directory [.]
126 -n|--name <arg> Extension name (REQUIRED)
127 -r|--release <arg> Extension release version (REQUIRED)
131 $ make -C vendor/m6w6/pharext