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.
On Tue, Oct 15, 2013 at 06:31:39AM +0200, Remi Collet wrote:
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).
Sounds good - thanks Remi.
Perhaps we can go further, using per-channel specific directories for a channel with lot of packages (phpunit, horde, symfony...)
Is much documentation installed this way? If there are only a couple of files per package it's probably not worth creating a hierarchy for channels.
Regards, Joe
Le 15/10/2013 11:32, Joe Orton a écrit :
Perhaps we can go further, using per-channel specific directories for a channel with lot of packages (phpunit, horde, symfony...)
Is much documentation installed this way? If there are only a couple of files per package it's probably not worth creating a hierarchy for channels.
In fact the number of files is not really the problem I'd like to prevent.
If we have a "Foo" extension, it will use
/usr/share/doc/pear/Foo /usr/share/tests/pear/Foo
So, as we can have variouos "Foo" extensions from various channel, a name conflict can occurs.
Using specific dirrectories for "bar" channel, the Foo extension will use:
/usr/share/doc/bar/Foo /usr/share/tests/bar/Foo
And thus, avoid file conflicts.
Well, no issue for now, so we could use this solution in the future if a new channel come with such a conflict.
Remi.
php-devel@lists.fedoraproject.org