[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PHP Policy Draft: API version



I'm putting together (currently unofficial) packages for a PHP extension. 
There's nothing in policy that's PHP specific, but google found me the PHP
Policy Draft which has this list listed as author:

http://webapps-common.alioth.debian.org/draft-php/html/index.html

Although it's only a draft currently, it seems best to try to adhere to it.

Section 5.2 says:

| Precompiled binary modules for PHP must be located in
| /usr/lib/phpPHPVERSION/PHP_API_VERSION. PHPVERSION is the numeric major
| version number (such as 3, 4, or 5), and PHP_API_VERSION is the version
| against which the module was compiled. The latter is defined at build-time#
| in /usr/include/phpPHPVERSION/main/php.h.
|
| The following sed command can extract the value of PHP_API_VERSION for php4:
|
| sed -ne 's/\#define PHP_API_VERSION //p' < /usr/include/php4/main/php.h

However, looking at the php4-dev and php5-dev packages in unstable:

$ sed -ne 's/\#define PHP_API_VERSION //p' < /usr/include/php4/main/php.h
20020918
$ php-config4 --extension-dir
/usr/lib/php4/20050606
$ sed -ne 's/\#define PHP_API_VERSION //p' < /usr/include/php5/main/php.h
20041225
$ php-config5 --extension-dir
/usr/lib/php5/20051025

And the existing packaged PHP modules seem to match the API version returned
by --extension-dir rather than that in php.h.  Is this a bug in the draft
PHP policy, in the packaging of those modules, or in the php[45]-dev packages?
Or have I misunderstood something?

Cheers,
    Olly



Reply to: