| | |
| | | 'description' => trim(strval($package->description), '- ') ? trim(strval($package->description)) : trim(strval($package->summary)), |
| | | 'homepage' => strval($package->uri), |
| | | 'license' => 'GPLv3+', |
| | | 'version' => strval($package->version->release), |
| | | 'authors' => array(), |
| | | 'repositories' => array( |
| | | array('type' => 'composer', 'url' => 'http://plugins.roundcube.net'), |
| | |
| | | |
| | | if ($package->lead) { |
| | | foreach ($package->lead as $lead) { |
| | | if (strval($lead->active) == 'no') { |
| | | continue; |
| | | } |
| | | $data['authors'][] = array( |
| | | 'name' => strval($lead->name), |
| | | 'email' => strval($lead->email), |
| | |
| | | } |
| | | } |
| | | |
| | | if ($package->dependencies->required->extension) { |
| | | foreach ($package->dependencies->required->extension as $ext) { |
| | | $data['require']['ext-' . strval($ext->name)] = '*'; |
| | | } |
| | | } |
| | | |
| | | // remove empty values |
| | | $data = array_filter($data); |
| | | |