Re: Packaging a "bin" dir correctly?

From: Date: Mon, 15 Sep 2008 16:46:36 +0000
Subject: Re: Packaging a "bin" dir correctly?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50760@lists.php.net to get a copy of this message
On Sep 15, 2008, at 11:22 , Brett Bieber wrote:
$opts = array(
      'baseinstalldir'    => '/',
      'packagefile'       => 'package2.xml',
      'packagedirectory'  => dirname(__FILE__) . '/trunk/',
      'filelistgenerator' => 'file',
      'roles'             => array(
          '*' => 'php',
      ),
      'exceptions'        => array(
          'bin/*'   => 'script',
          'tests/*' => 'test',
          'docs/*'  => 'doc',
      ),
); ...
The standard layout should automatically set the role="doc" and role="test" on the docs and tests dirs, so I don't think you need those and I believe the exceptions array should reference individual files. Maybe try something like this? ucommbieber:core bbieber$ svn diff release Index: release =================================================================== --- release (revision 3394) +++ release (working copy) @@ -140,9 +140,7 @@
        '*' => 'php',
    ),
    'exceptions'        => array(
-        'bin/*'   => 'script',
-        'tests/*' => 'test',
-        'docs/*'  => 'doc',
+        'bin/solar' => 'script',
    ),
);
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! * * * Now for part 2. ;-) The resulting installation puts the files in these dirs:
    pear/
        bin/
            bin/
                solar
        doc/
            Solar/
                docs/
                    ...etc...
        php/
            Solar.php
            Solar/
                ...etc...
Note the "pear/bin/bin/solar" bit is inconsistent with the "doc/Solar/docs/" bit. What I would prefer to see is something with less traversal and more consistency to it, maybe like this:
    pear/
        bin/
            Solar/
                solar
        doc/
            Solar/
                ...etc...
        php/
            Solar.php
            Solar/
Note that "pear/doc/Solar/docs/..." from earlier becomes "pear/doc/Solar/..." instead, and that "pear/bin/bin/solar" becomes "pear/Solar/solar" instead. Any hints on how I can structure the project or the packaging config to make that happen? (If not possible, that's ok, it's not a requirement; this is almost an aesthetic point. I do like consistency and predictability, though. ;-) -- Paul M. Jones http://paul-m-jones.com/

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