PECL package tests and documentation
by Remi Collet
Hi,
In last update, php-pear-1.9.4-23.fc20 I have change the configuration
for the PECL channel
- doc_dir = /usr/share/doc/pecl
- test_dir = /usr/share/tests/pecl
So this is consistent with pear channel, and avoid name conflicts (if a
pecl extension have the name that a pear extension).
For now, pecl package don't use this directories, but install
documentation in %{_pkgdocdir}, as other package.
This raise a small issue. Outout of "pecl list-files foo" is not
reliable (as files are not installed where expected).
For now, we cannot use "pecl install ... " for those files (a pear
bug..., which need investigation).
A simple generic loop do the work
%install
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do
install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%file
%doc %{pecl_docdir}/%{pecl_name}
Perhaps we can go further, using per-channel specific directories for a
channel with lot of packages (phpunit, horde, symfony...)
Any thought or comment ?
Remi.
10 years, 1 month
Fwd: [PHP-DEV] PECL site improvements
by Remi Collet
FYI, very interesting for us :)
Remi.
-------- Message original --------
Sujet: [PHP-DEV] PECL site improvements
Date : Mon, 14 Oct 2013 13:34:50 +0200
De : Anatol Belski <ab(a)php.net>
Pour : pecl-dev(a)lists.php.net, internals(a)lists.php.net
Hi,
there are two improvements just implemented to the PECL website.
I
Every package is required to have LICENSE or COPYING to be present in
the root of the package. The goal is to enforce the conformance with at
least PHP and BSD licenses. Where by no explicit check for exact license
type is done, it's considered as a good practice to include the license.
Also, the licenses will be included into the windows binary packages. To
add that file to the tarball, just add a line like this to the root dir
in the package.xml
<file name="LICENSE" role="doc" />
II
Every package is required to have the macros PHP_MYEXTNAME_VERSION to be
defined in one of the headers in the root of the package. The goal is to
fix discrepancy between phpinfo() and PECL site extension versions
shown. I guess it happened almost to everyone at least once to
unintendingly forget to sync both version strings before the release.
The actual macros name is guessed using <name> and <providesextension>
tags from package.xml. The common definition format is
#define PHP_MYEXTNAME_VERSION "1.2.3"
That macros should be then used in the zend_module_entry defining the
extension module. The macros name has to match the exact pattern, not
MYEXTNAME_VERSION, MYEXTNAME_VERSION_STRING, MYEXT_VERSION_STR or else
because there can be other extension specific macros defined and could
possibly lead to ambiguity. Say the ext can have PHP_MYEXT_VERSION_STR
and PHP_MYEXT_VERSION_ID, so then it's hard to guess.
I'm going to walk through the extensions and fix this definitions in the
next days, but if you'll need to release before it's done, please fix it
yourself.
That's it, please ping me if you think there's a bug in one of those
changes.
Regards
Anatol
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
10 years, 1 month