????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.28 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/bin/X11/ |
Upload File : |
#!/usr/bin/perl -w
=head1 NAME
dh_phppear - calculates PHP PEAR dependencies
=head1 SYNOPSIS
B<dh_phppear> [S<I<debhelper options>>]
=head1 DESCRIPTION
B<dh_phppear> is a debhelper program that is responsible for generating
the B<${phppear:*}> substitutions and adding them to substvars files.
The program will look at F<package.xml> (or F<package2.xml>) in your package,
and will use this information to generate:
=over 2
=item *
B<${phppear:summary}>, B<${phppear:description}> and B<${phppear:channel}>
=item *
B<${phppear:Debian-Depends}>, B<${phppear:Debian-Recommends}> and B<${phppear:Debian-Breaks}>
=back
The program will look at F<channel.xml> in your package,
and will use this information to generate:
=over 2
=item *
B<${phppear:channel-name}>, B<${phppear:channel-summary}> and B<${phppear:channel-alias}>
=item *
B<${phppear:channel-common-description}>
=back
Those variables will be substituted into your package's F<control>
file wherever you place the token B<${phppear:*}>.
=head1 FILES
=over 4
=item debian/pkg-php-tools-overrides
Package that don't want to follow automatic PEAR package name to Debian package
name conversion can override the conversion by creating this file.
It can be installed in B</usr/share/pkg-php-tools/overrides/>I<src:package>.
This feature requires pkg-php-tools (>= 1~).
The format is a set of lines, with each line having the following fields:
=over 6
=item I<channel_url>
The channel URL as found in package.xml (example: I<pear.phpunit.de>).
=item I<pear_package_name>
The PEAR package name (example: I<phpunit>).
=item I<debian_package_name>
The resulting Debian package name (example: I<phpunit>).
Use I<builtin> if the package is compiled from the php5 sourcepackage.
Use I<none> if the PEAR package can't be simply translated to Debian name.
=back
=back
=cut
use strict;
use Config;
use Debian::Debhelper::Dh_Lib;
use Text::Wrap;
sub _shell_exec {
my $command=shift;
my $output = `$command`;
if ($? == -1) {
error("$command failed to execute: $!");
}
elsif ($? & 127) {
error("$command died with signal ".($? & 127));
}
elsif ($? != 0) {
error("$command returned exit code ".($? >> 8));
}
return $output;
}
init();
foreach my $package (@{$dh{DOPACKAGES}}) {
if (-e "package.xml" || -e "package2.xml") {
my $deps = _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d debian_deps .');
for (split /^/, $deps) {
/^(\w+):\s*(.*)$/;
addsubstvar($package, "phppear:Debian-".$1, $2);
}
my $summary = _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d summary .');
$summary =~ s/\.$//;
addsubstvar($package, "phppear:summary", $summary);
my $description = _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d description .');
$description =~ s/^\s*//mg;
$description =~ s/^\*/ */mg;
local($Text::Wrap::separator) = '${Newline}';
# Wrap and replace empty lines with a dot
$description = join('${Newline}.${Newline}', split('${Newline}${Newline}', wrap("", "", $description)));
$description =~ s/\t+/ /g;
addsubstvar($package, "phppear:description", $description);
addsubstvar($package, "phppear:channel", _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d channel .'));
}
if (-e "channel.xml") {
addsubstvar($package, "phppear:channel-name", _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d channel_name channel.xml'));
addsubstvar($package, "phppear:channel-summary", _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d channel_summary channel.xml'));
my $alias = _shell_exec('/usr/share/pkg-php-tools/scripts/phppkginfo -d channel_alias channel.xml');
addsubstvar($package, "phppear:channel-alias", $alias);
my $common_desc = "This is the PEAR channel registry entry for $alias.\n\n".
"PEAR is a framework and distribution system for reusable PHP components. ".
"A PEAR channel is a website that provides package for download and a few extra meta-information for files.";
local($Text::Wrap::separator) = '${Newline}';
# Wrap and replace empty lines with a dot
$common_desc = join('${Newline}.${Newline}', split('${Newline}${Newline}', wrap("", "", $common_desc)));
addsubstvar($package, "phppear:channel-common-description", $common_desc);
}
}
=head1 CONFORMS TO
Debian policy, version 3.9.4
PHP PEAR policy, version yet-to-be-written
=head1 SEE ALSO
F</usr/share/doc/pkg-php-tools/README.PEAR>, L<pkg-php-tools(7)>
L<debhelper(7)> (Note: This program is not part of debhelper)
=head1 AUTHOR
Mathieu Parent <sathieu@debian.org>