-
Notifications
You must be signed in to change notification settings - Fork 0
/
makepackage.php
65 lines (60 loc) · 2.03 KB
/
makepackage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Make package file for the UNL_Autoload package.
*
* @package UNL_Autoload
* @author Brett Bieber
*/
ini_set('display_errors',true);
/**
* Require the PEAR_PackageFileManager2 classes, and other
* necessary classes for package.xml file creation.
*/
require_once 'PEAR/PackageFileManager2.php';
require_once 'PEAR/PackageFileManager/File.php';
require_once 'PEAR/Task/Postinstallscript/rw.php';
require_once 'PEAR/Config.php';
require_once 'PEAR/Frontend.php';
/**
* @var PEAR_PackageFileManager
*/
PEAR::setErrorHandling(PEAR_ERROR_DIE);
chdir(dirname(__FILE__));
$pfm = PEAR_PackageFileManager2::importOptions('package.xml', array(
//$pfm = new PEAR_PackageFileManager2();
//$pfm->setOptions(array(
'packagedirectory' => dirname(__FILE__),
'baseinstalldir' => '/',
'filelistgenerator' => 'svn',
'ignore' => array( 'package.xml',
'.project',
'*.tgz',
'makepackage.php',
'.cache'),
'simpleoutput' => true,
'roles'=>array('php'=>'php' ),
'exceptions'=>array()
));
$pfm->setPackage('UNL_Autoload');
$pfm->setPackageType('php'); // this is a PEAR-style php script package
$pfm->setSummary('An autoloader implementation for UNL PEAR packages');
$pfm->setDescription('This package provides an autoloader for classes beginning
with UNL_ and is mainly used for autoloading package files from http://pear.unl.edu/.');
$pfm->setChannel('pear.unl.edu');
$pfm->setAPIStability('alpha');
$pfm->setReleaseStability('alpha');
$pfm->setAPIVersion('0.5.0');
$pfm->setReleaseVersion('0.5.0');
$pfm->setNotes('
* First release.');
//$pfm->addMaintainer('lead','saltybeagle','Brett Bieber','[email protected]');
$pfm->setLicense('BSD License', 'http://www1.unl.edu/wdn/wiki/Software_License');
$pfm->clearDeps();
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.4.3');
$pfm->generateContents();
if (isset($_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
$pfm->writePackageFile();
} else {
$pfm->debugPackageFile();
}