Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a8659ed2d5
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (82 sloc) 2.417 kb
<?php
$debug = false;
if (isset($argv[1])) {
$debug = true;
}
require_once('PEAR/PackageFileManager.php');
$pkg = new PEAR_PackageFileManager;
// directory that PEAR CVS is located in
$cvsdir = '/cvs/pear/';
$packagedir = $cvsdir . 'Net_FTP2/';
$category = 'Networking';
$version = '0.1';
$summary = 'Net_FTP2 provides multiple backends and advanced features for communication with FTP servers.';
$description = <<<EOT
[[[DESCRIBTION TO BE ADDED HERE]]]
EOT;
$notes = <<<EOT
EOT;
$e = $pkg->setOptions(
array('baseinstalldir' => '',
'summary' => $summary,
'description' => $description,
'version' => $version,
'packagedirectory' => $packagedir,
'pathtopackagefile' => $packagedir,
'state' => 'devel',
// 'filelistgenerator' => 'cvs',
'filelistgenerator' => 'file',
'notes' => $notes,
'package' => 'Net_FTP2',
'dir_roles' => array(
'example' => 'doc',
'test' => 'test'
),
'ignore' => array(
'package.xml',
'doc*',
'test*',
'generate_package_xml.php',
'*.tgz',
'FTP_PHP5.php',
),
)
);
if (PEAR::isError($e)) {
echo $e->getMessage();
exit;
}
$e = $pkg->addMaintainer('toby', 'lead', 'Tobias Schlitt', 'toby@php.net');
if (PEAR::isError($e)) {
echo $e->getMessage();
exit;
}
// Orphaned with socket backend
// $e = $pkg->addDependency('ftp', null, 'has', 'ext');
if (PEAR::isError($e)) {
echo $e->getMessage();
exit;
}
// hack until they get their shit in line with docroot role
$pkg->addRole('tpl', 'php');
$pkg->addRole('png', 'php');
$pkg->addRole('gif', 'php');
$pkg->addRole('jpg', 'php');
$pkg->addRole('css', 'php');
$pkg->addRole('js', 'php');
$pkg->addRole('ini', 'php');
$pkg->addRole('inc', 'php');
$pkg->addRole('afm', 'php');
$pkg->addRole('pkg', 'doc');
$pkg->addRole('cls', 'doc');
$pkg->addRole('proc', 'doc');
$pkg->addRole('sh', 'script');
if ($debug) {
$e = $pkg->debugPackageFile();
} else {
$e = $pkg->writePackageFile();
}
if (PEAR::isError($e)) {
echo $e->getMessage();
}
?>
Jump to Line
Something went wrong with that request. Please try again.