File: debian-upstream

package info (click to toggle)
pkg-perl-tools 0.85
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 796 kB
  • sloc: perl: 3,254; sh: 3,244; makefile: 144; python: 18
file content (64 lines) | stat: -rwxr-xr-x 1,195 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/perl

use strict;
use warnings;
use Carp;

use CPAN::Meta;
use Debian::Upstream::Metadata::Perl();
my $meta;

if ( -r 'META.json' ) {
    $meta = CPAN::Meta->load_file('META.json');
} elsif ( -r 'META.yml' ) {
    $meta = CPAN::Meta->load_file('META.yml');
} else {
    croak 'Neither META.json nor META.yml found.';
}

Debian::Upstream::Metadata::Perl->convert($meta, 'debian/upstream/metadata');

=pod

=head1 NAME

dpt-debian-upstream - convert resources from META.{json,yml} to debian/upstream/metadata

=head1 SYNOPSIS

B<dpt debian-upstream>

=head1 DESCRIPTION

B<dpt debian-upstream> reads information from F<META.json> or F<META.yml> and
writes it to F<debian/upstream/metadata>, according to the UpstreamMetaData
specification.

Please, note that upstream links will be switched to https URLs.

=head1 SEE ALSO

=over

=item *

L<CPAN::Meta::Spec>

=item *

L<UpstreamMetaData|https://wiki.debian.org/UpstreamMetadata>

=back

=head1 COPYRIGHT AND LICENSE

=over

=item Copyright 2013-2024, gregor herrmann L<gregoa@debian.org>

=item Copyright 2016, Alex Muntada L<alexm@alexm.org>

=back

This program is free software and can be distributed under the same terms as
Perl.