From: Tomas V.V.Cox Date: Fri, 19 Sep 2003 16:50:17 +0000 (+0000) Subject: RFC about PECL binary creation and distribution X-Git-Tag: RELEASE_0_7~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=926cfa307cc797152a31c2bf70ad395e953718bf;p=php RFC about PECL binary creation and distribution --- diff --git a/pear/docs/rfc01_PEAR_pecl-binaries.txt b/pear/docs/rfc01_PEAR_pecl-binaries.txt new file mode 100644 index 0000000000..767a486503 --- /dev/null +++ b/pear/docs/rfc01_PEAR_pecl-binaries.txt @@ -0,0 +1,88 @@ +Author: Tomas V.V.Cox +Revision: $Id$ +Abstract: Open discussion on how to handle PECL binary packages + + +pecl package name +----------------- + +The name of the extension would be: + +peclfoo-bin---3.1.2.tgz + +The os (Operating system) and arch (CPU type), would be the value +returned by the OS_Guess class. + +package creation +---------------- + +pear package [-t ] + +-t The type of package you want to generate (pear, rpm, +msi, src, etc) + +Without args it will package the extension as it does nowadays (the +same as "-t src"). + +We have now native pear packages, rpm, msi is planned and others +will surely come. Additionally of generating the native package description +file, we could perhaps also call the tools for generating the whole package. + +An idea would be to create in addition a BUILDINFO.txt file with some data about +the env where the extension was compiled at, like the +php version, the php_uname(), the extra libs versions, os vendor +version, pear version, etc. + +package.xml +----------- + +As a binary release shares the same release data with the source +distrib, the same package.xml file could be used for all kind of +distribs. Let's say something like: + + + ... + + + .. + + + + +A package may contain many compiled extensions for different platforms, +one single extension or the sources. + + +Installation +------------ + +pear install -t bin peclfoo (download and install the binary distrib of +peclfoo for your current OS-ARCH) + +pear install peclfoo (download, build and install peclfoo) + +All the files with role="ext" would be installed +in "ext_dir" (pear cmd setting). The user can config it with "pear config-set ext_dir=XXX". +If this var is not explicitly set, the following will be used for +finding a default location: + +if (getenv('PHP_PEAR_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); + } else { + if (ini_get('extension_dir')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + } elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); + } elseif (defined('PHP_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); + } +} + +Listing in the web +------------------ + +A new column "Type" should be added to the release listing under the +package home page at pear.php.net, saying that the package is a binary +distrib compiled for OS X and ARCH Y or sources.