support packages that have been pickle'd
[pharext/pharext] / README.md
index 63b6cdfaa05fc4a1f4ebdb5605941b62b963c6cc..1219ccb8b2fac6a1ae908f514e57fec1ddcf64db 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,16 +4,14 @@ Distribute your PHP extension as self-installable phar executable
 
 ## About
 
-### Disclaimer
-
 You don't need this package to install any `*.ext.phar` extension packages,
 just run them with php:
 
        $ ./pecl_http-2.4.0dev.ext.phar
 
-Or, if the execute permission bit got lost somehow:
+For a compressed phar, or if the execute permission bit got lost somehow:
 
-       $ php pecl_http-2.4.0dev.ext.phar
+       $ php pecl_http-2.4.0dev.ext.phar.gz
 
 Command help:
 
@@ -21,28 +19,57 @@ Command help:
 
 Yields:
 
+       pharext v2.0.0 (c) Michael Wallner <mike@php.net>
+
        Usage:
-       
-         $ ./pecl_http-2.4.0dev.ext.phar [-h|-v|-q|-s] [-p|-n|-c <arg>]
-       
-           -h|--help                    Display help 
-           -v|--verbose                 More output 
-           -q|--quiet                   Less output 
-           -p|--prefix <arg>            PHP installation directory  [/usr]
-           -n|--common-name <arg>       PHP common program name, e.g. php5  [php]
-           -c|--configure <arg>         Additional extension configure flags 
-           -s|--sudo [<arg>]            Installation might need increased privileges  [sudo -S %s]
-
-If your installation destination needs escalated permissions, have a look at the `--sudo` option:
-
-       $ ./pecl_http-2.4.0dev.ext.phar --sudo
+
+         $ ./pecl_http-2.4.0dev.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
+               --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]
+
+If your installation destination needs escalated permissions, have a look at [the `--sudo` option](https://github.com/m6w6/pharext/wiki/Usage-of-*.ext.phar-packages#privileges):
+
+       $ ./pecl_http-2.4.0dev.ext.phar --ini /etc/php/conf.d/pecl.ini --sudo
+       Installing propro-1.0.1.ext.phar ... 
+       Running phpize ... OK
+       Running configure ... OK
+       Running make ... OK
+       Running install ... OK
+       Running INI owner transfer ... OK
+       Running INI permission transfer ... OK
+       Running INI activation ... OK
+       Cleaning up /tmp/propro-1.0.1.ext.phar.54fdbc828e3ef ...
+       Installing raphf-1.0.5.ext.phar ... 
        Running phpize ... OK
        Running configure ... OK
        Running make ... OK
-       Running install ... Password:············
-       Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20121212/
-       Installing header files:          /usr/include/php/
-       OK
+       Running install ... OK
+       Running INI owner transfer ... OK
+       Running INI permission transfer ... OK
+       Running INI activation ... OK
+       Cleaning up /tmp/raphf-1.0.5.ext.phar.54fdbc828e5e0 ...
+       Installing pecl_http-2.4.0dev.ext.phar ... 
+       Running phpize ... OK
+       Running configure ... OK
+       Running make ... OK
+       Running install ... OK
+       Running INI owner transfer ... OK
+       Running INI permission transfer ... OK
+       Running INI activation ... OK
+       Cleaning up /tmp/pecl_http-2.4.0dev.ext.phar.54fdbc828e1fb ...
+
 
 ### Prerequisites
 
@@ -52,80 +79,23 @@ The usual tools you need to build a PHP extension:
 
 A network connection is not needed.
 
-### Not implemented
-
-* Dependencies
-* Package description files
-
-## Download for extension maintainers
+## Extension maintainers
 
 Download the pharext binary of the [latest release](https://github.com/m6w6/pharext/releases/latest).
 
-## Installation for extension maintainers
+Be aware that you need the [public key](https://github.com/m6w6/pharext/wiki/Public-key) to run official `pharext` releases.
 
-       $ composer require --dev m6w6/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-----
 
-### Prerequisites:
+Place it as `pharext.pubkey` in the same directory where the `pharext` binary is located. IF you cloned the repository or installed `pharext` through composer, it is already at the right location.
 
-* make
-* php + phar
+Please have a look at the [wiki](https://github.com/m6w6/pharext/wiki), to learn [how to use](https://github.com/m6w6/pharext/wiki/Usage-of-the-pharext-packager) the pharext installer to package self-installing PHP extensions.
 
-## Usage
-
-       $ ./vendor/bin/pharext --pecl --source ../pecl_http.git
-
-Yields:
-
-       Creating phar ./pecl_http-2.4.0dev.ext.phar.54f6e987ae00f.tmp ... OK
-       Finalizing ./pecl_http-2.4.0dev.ext.phar ... OK
-
-Note that the PECL source can infer package name and release version from the package.xml.
-
-Another example using `git ls-files`:
-
-       $ ./vendor/bin/pharext -v -g -s ../raphf.git --name raphf --release 1.0.5
-
-Yields:
-
-       Creating phar ./raphf-1.0.5.ext.phar.54f6ebd71f13b.tmp ...
-       Packaging .gitignore
-       Packaging CREDITS
-       Packaging Doxyfile
-       Packaging LICENSE
-       Packaging TODO
-       Packaging config.m4
-       Packaging config.w32
-       Packaging package.xml
-       Packaging php_raphf.c
-       Packaging php_raphf.h
-       Packaging raphf.png
-       Packaging tests/http001.phpt
-       Packaging tests/http002.phpt
-       Packaging tests/http003.phpt
-       Packaging tests/http004.phpt
-       OK
-       Finalizing ./raphf-1.0.5.ext.phar ... OK
-
-Command help:
-
-       $ ./vendor/bin/pharext --help
-
-Yields:
-
-       Usage:
-       
-         $ ./vendor/bin/pharext [-h|-v|-q|-g|-p] -s <arg> -n <arg> -r <arg> [-d <arg>]
-       
-           -h|--help                    Display this help 
-           -v|--verbose                 More output 
-           -q|--quiet                   Less output 
-           -s|--source <arg>            Extension source directory (REQUIRED)
-           -g|--git                     Use `git ls-files` instead of the standard ignore filter 
-           -p|--pecl                    Use PECL package.xml instead of the standard ignore filter 
-           -d|--dest <arg>              Destination directory  [.]
-           -n|--name <arg>              Extension name (REQUIRED)
-           -r|--release <arg>           Extension release version (REQUIRED)
-
-## Rebuilding
-
-       $ make -C vendor/m6w6/pharext