Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

package.php 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. * This is the package.xml generator for Crypt_GPG
  5. *
  6. * PHP version 5
  7. *
  8. * LICENSE:
  9. *
  10. * This library is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU Lesser General Public License as
  12. * published by the Free Software Foundation; either version 2.1 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, see
  22. * <http://www.gnu.org/licenses/>
  23. *
  24. * @category Encryption
  25. * @package Crypt_GPG
  26. * @author Michael Gauthier <mike@silverorange.com>
  27. * @author Nathan Fredrikson <nathan@silverorange.com>
  28. * @copyright 2005-2013 silverorange
  29. * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
  30. * @link http://pear.php.net/package/Crypt_GPG
  31. */
  32. require_once 'PEAR/PackageFileManager2.php';
  33. PEAR::setErrorHandling(PEAR_ERROR_DIE);
  34. $apiVersion = '1.6.2';
  35. $apiState = 'stable';
  36. $releaseVersion = '1.6.2';
  37. $releaseState = 'stable';
  38. $releaseNotes =
  39. "Added options to configure digest/cipher algorithms.";
  40. $description =
  41. "This package provides an object oriented interface to GNU Privacy " .
  42. "Guard (GnuPG). It requires the GnuPG executable to be on the system.\n\n" .
  43. "Though GnuPG can support symmetric-key cryptography, this package is " .
  44. "intended only to facilitate public-key cryptography.\n\n" .
  45. "This package requires PHP version 5.4.8 or greater.";
  46. $package = new PEAR_PackageFileManager2();
  47. $package->setOptions(
  48. array(
  49. 'filelistgenerator' => 'file',
  50. 'simpleoutput' => true,
  51. 'baseinstalldir' => '/',
  52. 'packagedirectory' => './',
  53. 'dir_roles' => array(
  54. 'Crypt' => 'php',
  55. 'Crypt/GPG' => 'php',
  56. 'tests' => 'test',
  57. 'data' => 'data'
  58. ),
  59. 'exceptions' => array(
  60. 'LICENSE' => 'doc',
  61. 'README.md' => 'doc',
  62. 'scripts/crypt-gpg-pinentry' => 'script'
  63. ),
  64. 'ignore' => array(
  65. 'tests/config.php',
  66. 'tools/',
  67. 'package.php',
  68. 'composer.json',
  69. '*.tgz'
  70. ),
  71. 'installexceptions' => array(
  72. 'scripts/crypt-gpg-pinentry' => '/'
  73. )
  74. )
  75. );
  76. $package->setPackage('Crypt_GPG');
  77. $package->setSummary('GNU Privacy Guard (GnuPG)');
  78. $package->setDescription($description);
  79. $package->setChannel('pear.php.net');
  80. $package->setPackageType('php');
  81. $package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
  82. $package->setNotes($releaseNotes);
  83. $package->setReleaseVersion($releaseVersion);
  84. $package->setReleaseStability($releaseState);
  85. $package->setAPIVersion($apiVersion);
  86. $package->setAPIStability($apiState);
  87. $package->addMaintainer(
  88. 'lead',
  89. 'gauthierm',
  90. 'Mike Gauthier',
  91. 'mike@silverorange.com'
  92. );
  93. $package->addMaintainer(
  94. 'lead',
  95. 'nrf',
  96. 'Nathan Fredrickson',
  97. 'nathan@silverorange.com'
  98. );
  99. $package->addMaintainer(
  100. 'lead',
  101. 'alec',
  102. 'Aleksander Machniak',
  103. 'alec@alec.pl'
  104. );
  105. $package->addReplacement(
  106. 'data/pinentry-cli.xml',
  107. 'package-info',
  108. '@package-version@',
  109. 'version'
  110. );
  111. $package->addReplacement(
  112. 'Crypt/GPG/PinEntry.php',
  113. 'package-info',
  114. '@package-name@',
  115. 'name'
  116. );
  117. $package->addReplacement(
  118. 'Crypt/GPG/PinEntry.php',
  119. 'pear-config',
  120. '@data-dir@',
  121. 'data_dir'
  122. );
  123. $package->addReplacement(
  124. 'Crypt/GPG/Engine.php',
  125. 'pear-config',
  126. '@bin-dir@',
  127. 'bin_dir'
  128. );
  129. $package->addReplacement(
  130. 'scripts/crypt-gpg-pinentry',
  131. 'pear-config',
  132. '@php-dir@',
  133. 'php_dir'
  134. );
  135. $package->setPhpDep('5.4.8');
  136. $package->addExtensionDep('optional', 'posix');
  137. $package->addExtensionDep('required', 'mbstring');
  138. $package->addOsDep('windows', true);
  139. $package->setPearinstallerDep('1.4.0');
  140. $package->addPackageDepWithChannel(
  141. 'required',
  142. 'Console_CommandLine',
  143. 'pear.php.net',
  144. '1.1.10'
  145. );
  146. $package->generateContents();
  147. $package->addRelease();
  148. $package->addInstallAs(
  149. 'scripts/crypt-gpg-pinentry',
  150. 'crypt-gpg-pinentry'
  151. );
  152. if ( isset($_GET['make'])
  153. || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')
  154. ) {
  155. $package->writePackageFile();
  156. } else {
  157. $package->debugPackageFile();
  158. }
  159. ?>