24b5939d5cd1bd6d1576080488a21a5373d9fe18
[yaffs-website] / vendor / lsolesen / pel / makepackagexml.php
1 <?php
2 /**
3  * package.xml generation script
4  *
5  * To create a package you need to do the following. Before making the package
6  * PEL should be compiled so the .mo files are created.
7  *
8  * <code>
9  * $ php makepackagexml.php make
10  * $ pear package package.xml
11  * </code>
12  *
13  * @package PEL
14  * @author  Lars Olesen <lars@legestue.net>
15  * @version @package-version@
16  * @license http://www.gnu.org/licenses/gpl.html GNU General Public
17  */
18 require_once 'PEAR/PackageFileManager2.php';
19
20 $version = '0.9.2';
21 $stability = 'beta';
22 $notes = '* initial release as a PEAR package';
23 $url = 'http://downloads.sf.net/pel/PEL-' . $version . '.tgz';
24
25 PEAR::setErrorHandling(PEAR_ERROR_DIE);
26 $pfm = new PEAR_PackageFileManager2();
27 $pfm->setOptions(array(
28     'baseinstalldir' => 'PEL',
29     'filelistgenerator' => 'file',
30     'packagedirectory' => dirname(__FILE__),
31     'packagefile' => 'package.xml',
32     'ignore' => array(
33         'makepackagexml.php',
34         '*.tgz',
35         '*.sh',
36         'test/',
37         'tutorials/',
38         'authors.xml'
39     ),
40     'dir_roles' => array(
41         'doc' => 'doc',
42         'examples' => 'doc',
43         'test' => 'test'
44     ),
45     'exceptions' => array(
46         'README' => 'doc',
47         'AUTHORS' => 'doc',
48         'COPYING' => 'doc',
49         'INSTALL' => 'doc',
50         'NEWS' => 'doc',
51         'TODO' => 'doc'
52     ),
53     'simpleoutput' => true
54 ));
55
56 $pfm->setPackage('PEL');
57 $pfm->setSummary('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data.');
58 $pfm->setDescription('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data. This is the data that digital cameras place in their images, such as the date and time, shutter speed, ISO value and so on.
59
60 Using PEL, one can fully modify the Exif data, meaning that it can be both read and written. Completely new Exif data can also be added to images. PEL is written completely in PHP and depends on nothing except a standard installation of PHP, version 5. PEL is hosted on SourceForge.');
61 $pfm->setUri($url);
62 $pfm->setLicense('GPL License', 'http://www.gnu.org/licenses/gpl.html');
63 $pfm->addMaintainer('lead', 'mgeisler', 'Martin Geisler', 'mgeisler@mgeisler.net');
64 $pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', 'lars@legestue.net');
65
66 $pfm->setPackageType('php');
67
68 $pfm->setAPIVersion($version);
69 $pfm->setReleaseVersion($version);
70 $pfm->setAPIStability($stability);
71 $pfm->setReleaseStability($stability);
72 $pfm->setNotes($notes);
73 $pfm->addRelease();
74
75 $pfm->clearDeps();
76 $pfm->setPhpDep('5.0.0');
77 $pfm->setPearinstallerDep('1.5.0');
78
79 $pfm->generateContents();
80
81 if (isset($_GET['make']) || (isset($_SERVER['argv']) && $_SERVER['argv'][1] == 'make')) {
82     if ($pfm->writePackageFile()) {
83         exit('package created');
84     }
85 } else {
86     $pfm->debugPackageFile();
87 }