#!/usr/bin/perl -w

use strict;
use warnings;

use RPM::Source::Transformation::GenericTransformationSet;
use RPM::Source::Transformation::Factory::RaiseRelease;
use RPM::Source::Transformation::GirarNMU;
use RPM::Source::Transformation::Provider::Name2Spec::GirarNMU::Apply;

our @ISA=qw/RPM::Source::Transform/;

$RPM::Source::Transformation::Factory::RaiseRelease::nextrel='none';
$RPM::Source::Transformation::Factory::RaiseRelease::defaultchangelog='- ';
$RPM::Source::Transformation::Component::GirarNMU::Options::gitbranch=undef;

our @LONGOPT_POD2USAGE;
our @LONGOPT=(
    );

my $converter=__PACKAGE__->new();
$converter->transform();


=head1	NAME

girar-nmu-apply - generate NMU packages according to their upload method.

=head1	SYNOPSIS

B<girar-nmu-apply>
[B<-h>] 

TODO_insert_pods_here

I<srpmname ...> | I<srpm ...>

=head1	DESCRIPTION

B<girar-nmu-apply> 
generate NMU packages according to their upload method.
For each package girar-nmu-apply generate either a git repository with
the NMU commmit or the NMU src.rpm according to the package's upload method.
Each result is stored either as OUT.gits/name.git or OUT.SRPMS/name/*src..rpm.

As an argument girar-nmu-apply takes either a list of original src.rpms 
or the path to dir with src.rpms in --srpmdir option and a list of names.


=head1	OPTIONS

There are lots of srpm processing options that are inherited from RPM::Source::*
utilities. To view full list of available options, run girar-nmu-apply --help.

=head2 girar-nmu-apply specific OPTIONS

=over

=item	B<--add-ch, --add-changelog> I<changelog text>

Text to add to Changelog. Default is none.

=item	B<-G> I<dir>

name of output directory with Git repositories.
Default is "OUT.gits".

=item	B<-S> I<dir>

name of output directory for src.rpms.
Default is "OUT.SRPMS".

=item	B<--hashertar>

Generate hasher-ready .tar file instead of src.rpm file.
Some src.rpm require you to install extra rpm-build-* or rpm-macros-* packages
or else rpmbuild -bs --nodeps will fail. On the other hand, generating hasher-ready .tar
file does not require installing rpm-build-* or rpm-macros-* packages, but
this tar file should be first processed in hasher.
Use --hashertar option to avoid polluting your working environment with
unnecessary rpm-build-* or rpm-macros-* packages.

=item	B<-H|--gitery> [I<gitery ssh alias>]

By default, gitery.altlinux.org account should be configured as gitery in ~/.ssh/config.
If you do not follow that convention, use -H <your gitery ssh alias> option.

=item	B<-h, --help>

Display this help and exit.

=back

=head1	AUTHOR

Written by Igor Vlasenko <viy@altlinux.org>.

=head1	COPYING

Copyright (c) 2010-2021 Igor Vlasenko, ALT Linux Team.

This 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.

=cut

