1.16.2-debian-1.16.2-1
  6   ˆl–Ü4ý(TÐ;â�À·q ©‹Fÿ�þ[ŒaYÆˆáD	#mùÎ„-6ïÍÀË ?÷     #!/usr/bin/perl
#
# dpkg-source
#
# Copyright Â© 1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
# Copyright Â© 1997 Klee Dienes <klee@debian.org>
# Copyright Â© 1999-2003 Wichert Akkerman <wakkerma@debian.org>
# Copyright Â© 1999 Ben Collins <bcollins@debian.org>
# Copyright Â© 2000-2003 Adam Heath <doogie@debian.org>
# Copyright Â© 2005 Brendan O'Dea <bod@debian.org>
# Copyright Â© 2006-2008 Frank Lichtenheld <djpig@debian.org>
# Copyright Â© 2006-2009,2012 Guillem Jover <guillem@debian.org>
# Copyright Â© 2008-2011 RaphaÃ«l Hertzog <hertzog@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

use strict;
use warnings;

use List::Util qw(any none);
use Cwd;
use File::Basename;
use File::Spec;

use Dpkg ();
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
use Dpkg::Arch qw(:operators);
use Dpkg::Deps;
use Dpkg::Compression;
use Dpkg::Conf;
use Dpkg::Control::Info;
use Dpkg::Control::Tests;
use Dpkg::Control::Fields;
use Dpkg::Substvars;
use Dpkg::Version;
use Dpkg::Vars;
use Dpkg::Changelog::Parse;
use Dpkg::Source::Format;
use Dpkg::Source::Package qw(get_default_diff_ignore_regex
                             set_default_diff_ignore_regex
                             get_default_tar_ignore_pattern);
use Dpkg::Vendor qw(run_vendor_hook);

textdomain('dpkg-dev');

my $controlfile;
my $changelogformat;

my $build_format;
my %options = (
    # Ignore files
    tar_ignore => [],
    diff_ignore_regex => '',
    # Misc options
    copy_orig_tarballs => 1,
    no_check => 0,
    no_overwrite_dir => 1,
    require_valid_signature => 0,
    require_strong_checksums => 0,
);

# Fields to remove/override
my %remove;
my %override;

my $substvars = Dpkg::Substvars->new();
my $tar_ignore_default_pattern_done;
my $diff_ignore_regex = get_default_diff_ignore_regex();

my @options;
my @cmdline_options;
while (@ARGV && $ARGV[0] =~ m/^-/) {
    my $arg = shift @ARGV;

    if ($arg eq '-b' or $arg eq '--build') {
        setopmode('build');
    } elsif ($arg eq '-x' or $arg eq '--extract') {
        setopmode('extract');
    } elsif ($arg eq '--before-build') {
        setopmode('before-build');
    } elsif ($arg eq '--after-build') {
        setopmode('after-build');
    } elsif ($arg eq '--commit') {
        setopmode('commit');
    } elsif ($arg eq '--print-format') {
        setopmode('print-format');
	report_options(info_fh => \*STDERR); # Avoid clutter on STDOUT
    } else {
        push @options, $arg;
    }
}

my $dir;
if (defined($options{opmode}) &&
    $options{opmode} =~ /^(build|print-format|(before|after)-build|commit)$/) {
    if (not scalar(@ARGV)) {
	usageerr(g_('--%s needs a directory'), $options{opmode})
	    unless $1 eq 'commit';
	$dir = '.';
    } else {
	$dir = File::Spec->catdir(shift(@ARGV));
    }
    stat($dir) or syserr(g_('cannot stat directory %s'), $dir);
    if (not -d $dir) {
	error(g_('directory argument %s is not a directory'), $dir);
    }
    if ($dir eq '.') {
	# . is never correct, adjust automatically
	$dir = basename(getcwd());
	chdir '..' or syserr(g_("unable to chdir to '%s'"), '..');
    }
    # --format options are not allowed, they would take precedence
    # over real command line options, debian/source/format should be used
    # instead
    # --unapply-patches is only allowed in local-options as it's a matter
    # of personal taste and the default should be to keep patches applied
    my $forbidden_opts_re = {
	'