Re: Packaging a "bin" dir correctly?

From: Date: Mon, 15 Sep 2008 21:30:42 +0000
Subject: Re: Packaging a "bin" dir correctly?
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50764@lists.php.net to get a copy of this message
On Mon, Sep 15, 2008 at 4:14 PM, Paul M Jones <pmjones88@gmail.com> wrote: > > On Sep 15, 2008, at 12:20 , Brett Bieber wrote: > >>> Very good, sir, and thank you: that does the trick. The options array >>> now >>> looks like this ... >>> >>> $opts = array( >>> 'baseinstalldir' => '/', >>> 'packagefile' => 'package2.xml', >>> 'packagedirectory' => dirname(__FILE__) . '/trunk/', >>> 'filelistgenerator' => 'file', >>> 'roles' => array( >>> '*' => 'php', >>> ), >>> 'exceptions' => array( >>> 'bin/solar' => 'script', >>> ), >>> ); >>> >>> ... and "bin/solar" goes into "pear/bin" on installation. Thanks! > > Slightly better: using "dir_roles". > > $opts = array( > ... > 'dir_roles' => array( > 'tests' => 'test', > 'docs' => 'doc', > 'bin' => 'script', > ), > ... > ); > > It still puts the scripts in "pear/bin/bin/solar" though. > >> Eh, I think that would be the 'installas' option... >> >> 'installas' => array('foo' => 'bar') >> will install foo as bar instead. > > Have tried that using 'installas' => array('bin/solar' => > 'Solar/solar') and > no joy -- it appears to be ignored by the packaging mechanism. Am I setting > it incorrectly? It works here for me - ucommbieber:core bbieber$ svn diff release Index: release =================================================================== --- release (revision 3394) +++ release (working copy) @@ -140,10 +140,11 @@ '*' => 'php', ), 'exceptions' => array( - 'bin/*' => 'script', - 'tests/*' => 'test', - 'docs/*' => 'doc', + 'bin/solar' => 'script', ), + 'installas' => array( + 'bin/solar' => 'Solar/solar', + ), ); Gives me: ucommbieber:core bbieber$ grep -A4 -B1 install-as trunk/package.xml <dir name="bin"> <file role="script" baseinstalldir="/" install-as="Solar/solar" name="solar"> <replace from="@package_version@" to="version" type="package-info"/> <replace from="@package_date@" to="date" type="package-info"/> </file> </dir> <!-- /bin --> > I get the feeling it's close, but not quite on the mark. E.g., the > PEAR_Size XML looks right, but I don't see how it's getting generated. This > looks like the generator script: > > > <http://cvs.php.net/viewvc.cgi/pear/PEAR_Size/scripts/create_package.xml.php?view=markup> Yeah, I don't think Ken's using that script to generate the contents/files section - he's just using the script for the verison/changelogs etc. He has: 'clearcontents' => false, -- Brett Bieber http://saltybeagle.com/

« previous php.pear.dev (#50764) next »