Re: PackageManager input options for a directory structure
| From: | Gregory Beaver | Date: | Mon, 05 Mar 2007 20:39:32 +0000 |
| Subject: | Re: PackageManager input options for a directory structure | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26735@lists.php.net to get a copy of this message | ||
Edward Z. Yang wrote:
> Hi, I am a developer who would like to use the PEAR infrastructure to
> distribute my packages. Because my codebase is large, I am using PEAR
> PackageManager to dynamically generate the package.xml file for me.
> However, I've run into some snags.
>
> My directory structure is as follows:
> htmlpurifier/
> library/
> HTMLPurifier/
> (lots of class files)
> HTMLPurifier.php
> tests/
> docs /
>
> Normally speaking, "htmlpurifier/library" would be added to the class
> path for someone to use my library. So, the contents of that folder
> should be added to PEAR's root directory for PHP code. Desired XML
> output looks like:
>
> <dir baseinstalldir="/" name="/">
> <file name="HTMLPurifier.php" role="php" />
> <dir name="HTMLPurifier">
> <!-- class files here -->
> </dir>
> </dir>
>
> However, if I register /htmlpurifier as the 'packagedirectory' option
> for PackageManager, all the class files will get cordoned off into
> another library/ folder, which is completely unacceptable.
>
> I have attempted to solve the problem by setting /htmlpurifier/library
> as the packagedirectory, but this prevents me from including the other
> directories: tests/ and docs/, in the PEAR distribution. I have tried:
>
> 'include' => array('*', '../tests/*', '../docs/*')
>
> But to no avail. Can anyone help me out? Any help would be greatly
> appreciated, even if it's a firm declaration that what I'm looking for
> is impossible and I should just change my directory structure.
Hi Edward,
What you are looking for is the 'installexceptions' value.
'installexceptions' => array('library/HTMLPurifier/*' =>
'HTMLPurifier/')
http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.setoptions.php
is the full documentation for options.
Greg