Changeset 2731

Show
Ignore:
Timestamp:
01/20/06 15:33:13 (3 years ago)
Author:
bergius
Message:

Now PEAR packaging handles config/mgdschema.xml files from components correctly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/net/nehmer/jobmarket/config/manifest.inc

    r2501 r2731  
    11'name' => 'net.nehmer.jobmarket', 
    22'version' => 1, 
     3'state' => 'stable', 
    34'class_definitions' => Array('midcomdba.inc'), 
    4  
    55'watches' => Array 
    66( 
     
    2323    ), 
    2424), 
     25'package.xml' => Array( 
     26    'summary' => 'Job market', 
     27    'description' => 'Job posting bulletin board', 
     28    'maintainers' => Array( 
     29        'torben' => Array( 
     30            'name' => 'Torben Nehmer', 
     31            'email' => 'torber@nehmer.net', 
     32            'role' => 'lead', 
     33        ), 
     34    ), 
     35), 
  • trunk/support/Role_MgdSchema/Mgdschema.php

    r2726 r2731  
    4646        $installing_paths = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer); 
    4747        $installing_paths[1] = $installing_paths[0]; 
    48         $installing_paths[2] = $installing_paths[1].'/'.basename($file); 
     48         
     49        // Clean up the filename 
     50        $mgdschema_name = basename($file); 
     51        if ($mgdschema_name == 'mgdschema.xml') 
     52        { 
     53            $mgdschema_name = $pkg->getPackage().'.xml'; 
     54        } 
     55         
     56        $installing_paths[2] = "{$installing_paths[1]}/{$mgdschema_name}"; 
    4957        return $installing_paths; 
    5058    } 
  • trunk/support/makedist2.sh

    r2730 r2731  
    2828de.linkm.newsticker 
    2929de.linkm.taviewer 
    30 net.nemein.ping" 
     30net.nemein.ping 
     31net.nehmer.jobmarket" 
    3132 
    3233for component in $COMPONENTS; do 
  • trunk/support/pear-package.php

    r2725 r2731  
    222222    if (!$name) 
    223223    { 
    224         $name = basename($directory_path); 
     224        $dir_name = basename($directory_path); 
    225225    } 
    226226     
    227227    $prefix .= '    '; 
    228228     
    229     $contents_string .= "{$prefix}<dir name=\"{$name}\">\n"; 
     229    $contents_string .= "{$prefix}<dir name=\"{$dir_name}\">\n"; 
    230230     
    231231    // List contents 
     
    250250        } 
    251251         
     252        // Handle packaging file roles 
     253        $role = 'php'; 
     254        if (   $dir_name == 'config' 
     255            && $entry == 'mgdschema.xml') 
     256        { 
     257            // MgdSchemas shipped by components are placed in config/mgdschema.xml 
     258            $role = 'mgdschema'; 
     259        } 
     260         
    252261        if (is_dir("{$directory_path}/{$entry}")) 
    253262        { 
     
    259268            // List the files 
    260269            // TODO: Support other roles than PHP? 
    261             $contents_string .= "{$prefix}    <file baseinstalldir=\"{$baseinstalldir}\" name=\"{$entry}\" role=\"php\" />\n"; 
     270            $contents_string .= "{$prefix}    <file baseinstalldir=\"{$baseinstalldir}\" name=\"{$entry}\" role=\"{$role}\" />\n"; 
    262271        } 
    263272    }