Re: question about @PHP-BIN@, file placement in packages, more
| From: | Matthew Weier O'Phinney | Date: | Tue, 05 Jul 2005 16:50:59 +0000 |
| Subject: | Re: question about @PHP-BIN@, file placement in packages, more | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38456@lists.php.net to get a copy of this message | ||
On 7/5/05, Greg Beaver <cellog@php.net> wrote:
> Matthew Weier O'Phinney wrote:
> > On 7/5/05, bertrand Gugger <bertrand@toggg.com> wrote:
> > > you need to associate a task with the <file> , something like:
> > > <tasks:replace from="@bin_dir@" to="bin_dir"
> > > type="pear-config" />
> > > or
> > > <replace from="@bin_dir@" to="bin_dir"
> > > type="pear-config" />
> > > see
> > >
> > > http://pear.php.net/manual/en/guide.developers.package2.tasks.php#guide.developers.package2.tasks.windowseol
> >
> >
> > Okay, thanks! As noted by Andrey, I actually needed to use to="php_bin" in
> > order to get the path to the PHP executable, but the link you provided
> > helped me understand why.
> >
> > Is there a way to do this with PEAR_PackageFileManager? Or will I need to
> > hand-hack the package.xml file to do so?
>
>
> http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.addreplacement.php
I've added lines like the following to my packaging script:
$e = $packagexml->addReplacement('File/Fortune.php', 'package-info',
'@package-version@', 'version');
$e = $packagexml->addReplacement('File/Fortune/Exception.php',
'package-info', '@package-version@', 'version');
$e = $packagexml->addReplacement('File/Fortune/Writer.php',
'package-info', '@package-version@', 'version');
$e = $packagexml->addReplacement('File/examples/phpFortune',
'pear-config', '@PHP-BIN@', 'php_bin');
These generate no errors, but when I run debugPackageFile() or
writePackageFile(), I get no output. This happens whether or not there is a
pre-existing package.xml file in that directory.
I'm using PEAR_PackageFileManager 1.6.0a1, with PEAR 1.4.0a12.
--
Matthew Weier O'Phinney
mweierophinney@gmail.com
http://weierophinney.net/matthew/