package.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. set_time_limit(0);
  3. require_once 'PEAR/PackageFileManager2.php';
  4. PEAR::setErrorHandling(PEAR_ERROR_PRINT);
  5. $pkg = new PEAR_PackageFileManager2;
  6. $pkg->setOptions(
  7. array(
  8. 'baseinstalldir' => '/',
  9. 'packagefile' => 'package2.xml',
  10. 'packagedirectory' => realpath(dirname(__FILE__) . '/library'),
  11. 'filelistgenerator' => 'file',
  12. 'include' => array('*'),
  13. 'dir_roles' => array('/' => 'php'), // hack to put *.ser files in the right place
  14. 'ignore' => array(
  15. 'HTMLPurifier.standalone.php',
  16. 'HTMLPurifier.path.php',
  17. 'standalone/'
  18. ),
  19. )
  20. );
  21. $pkg->setPackage('HTMLPurifier');
  22. $pkg->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl.html');
  23. $pkg->setSummary('Standards-compliant HTML filter');
  24. $pkg->setDescription(
  25. 'HTML Purifier is an HTML filter that will remove all malicious code
  26. (better known as XSS) with a thoroughly audited, secure yet permissive
  27. whitelist and will also make sure your documents are standards
  28. compliant.'
  29. );
  30. $pkg->addMaintainer('lead', 'ezyang', 'Edward Z. Yang', 'admin@htmlpurifier.org', 'yes');
  31. $version = trim(file_get_contents('VERSION'));
  32. $api_version = substr($version, 0, strrpos($version, '.'));
  33. $pkg->setChannel('htmlpurifier.org');
  34. $pkg->setAPIVersion($api_version);
  35. $pkg->setAPIStability('stable');
  36. $pkg->setReleaseVersion($version);
  37. $pkg->setReleaseStability('stable');
  38. $pkg->addRelease();
  39. $pkg->setNotes(file_get_contents('WHATSNEW'));
  40. $pkg->setPackageType('php');
  41. $pkg->setPhpDep('5.0.0');
  42. $pkg->setPearinstallerDep('1.4.3');
  43. $pkg->generateContents();
  44. $compat =& $pkg->exportCompatiblePackageFile1();
  45. $compat->writePackageFile();
  46. $pkg->writePackageFile();
  47. // vim: et sw=4 sts=4