5 require_once 'PEAR/PackageFileManager2.php';
6 require_once 'PEAR/PackageFileManager/File.php';
7 PEAR
::setErrorHandling(PEAR_ERROR_PRINT
);
8 $pkg = new PEAR_PackageFileManager2
;
12 'baseinstalldir' => '/',
13 'packagefile' => 'package2.xml',
14 'packagedirectory' => realpath(dirname(__FILE__
) . '/library'),
15 'filelistgenerator' => 'file',
16 'include' => array('*'),
17 'dir_roles' => array('/' => 'php'), // hack to put *.ser files in the right place
19 'HTMLPurifier.standalone.php',
20 'HTMLPurifier.path.php',
28 $pkg->setPackage('HTMLPurifier');
29 $pkg->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html');
30 $pkg->setSummary('Standards-compliant HTML filter');
32 'HTML Purifier is an HTML filter that will remove all malicious code
33 (better known as XSS) with a thoroughly audited, secure yet permissive
34 whitelist and will also make sure your documents are standards
38 $pkg->addMaintainer('lead', 'ezyang', 'Edward Z. Yang', 'admin@htmlpurifier.org', 'yes');
40 $version = trim(file_get_contents('VERSION'));
41 $api_version = substr($version, 0, strrpos($version, '.'));
43 $pkg->setChannel('htmlpurifier.org');
44 $pkg->setAPIVersion($api_version);
45 $pkg->setAPIStability('stable');
46 $pkg->setReleaseVersion($version);
47 $pkg->setReleaseStability('stable');
51 $pkg->setNotes(file_get_contents('WHATSNEW'));
52 $pkg->setPackageType('php');
54 $pkg->setPhpDep('5.0.0');
55 $pkg->setPearinstallerDep('1.4.3');
57 $pkg->generateContents();
59 $compat =& $pkg->exportCompatiblePackageFile1();
60 $compat->writePackageFile();
61 $pkg->writePackageFile();