[Pkg-parrot-devel] dh_parrot helper script

Alessandro Ghedini al3xbio at gmail.com
Thu Apr 12 18:54:27 UTC 2012


Hi,

as promised I've written the little script to implement the parrotapi mechanism
described earlier (see attached dh_parrot). It should be installed under
/usr/bin and called without arguments during build (in my tests I called it
after dh_perl).

I've also written a dh plugin (attached parrot.pm) which should make using the
dh_parrot script easier when using the short-form dh style debian/rules. It
should be installed under the /usr/share/perl5/Debian/Debhelper/Sequence folder.

I've already tested both on the nqp package and they seem to work fine (and,
btw, turned out being much much simpler than I thought).

Cheers

-- 
perl -E'$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
-------------- next part --------------
#!/usr/bin/perl -w

=head1 NAME

dh_parrot - generates Parrot dependencies

=cut

use strict;
use warnings;

use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

B<dh_parrot>

=head1 DESCRIPTION

B<dh_parrot> is a debhelper program that is responsible for generating
the B<${parrot:Depends}> substitutions and adding them to substvars files.

=cut

init();

my $parrot = 'parrot';

foreach my $package (@{$dh{DOPACKAGES}}) {
	my $version =`dpkg -s $parrot` =~ /^Version:\s*(\S+)/m;

	addsubstvar($package, 'parrot:Depends', $parrot, ">= $1");
	addsubstvar($package, 'parrot:Depends', "parrotapi-$1");
}

=head1 SEE ALSO

L<debhelper(7)>

=head1 AUTHOR

Alessandro Ghedini <ghedo at debian.org>

=cut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parrot.pm
Type: text/x-perl
Size: 158 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-parrot-devel/attachments/20120412/554fbf97/attachment.pm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-parrot-devel/attachments/20120412/554fbf97/attachment.pgp>


More information about the Pkg-parrot-devel mailing list