pharext

Distribute your PHP extensions as self-installing PHAR archives

Usage

If you downloaded a *.ext.phar, just run it with PHP:

$ ./my_extension-1.0.2.ext.phar

If the package was signed with a private key, be sure to also have the public key available right besides the extension package (my_extension-1.2.0.ext.phar.pubkey in this case).

See “Usage of *.ext.phar packages” for more information.

Usage for extension maintainers

$ ./bin/pharext --help

Yields:

pharext v@dev-master (c) Michael Wallner <mike@php.net>

Usage:

  $ ./bin/pharext [-hvqgpzZE] -n <arg> -r <arg> -s <arg> [-b|-d|-S <arg>]

    -h|--help                Display this help
    -v|--verbose             More output
    -q|--quiet               Less output
    -n|--name <arg>          Extension name (REQUIRED)
    -r|--release <arg>       Extension release version (REQUIRED)
    -s|--source <arg>        Extension source directory (REQUIRED)
    -g|--git                 Use `git ls-tree` to determine file list
    -b|--branch <arg>        Checkout this tag/branch
    -p|--pecl                Use PECL package.xml to determine file list, name and release
    -d|--dest <arg>          Destination directory [.]
    -z|--gzip                Create additional PHAR compressed with gzip
    -Z|--bzip                Create additional PHAR compressed with bzip
    -S|--sign <arg>          Sign the PHAR with a private key
    -E|--zend                Mark as Zend Extension
    --signature              Show pharext signature
    --license                Show pharext license
    --version                Show pharext version

See also here and there: