Source

packaging / dl-changelog

Full commit
#!/usr/bin/perl -w
#
# This tool was intended to convert a .spec %changelog section into a Debian changelog,
# however, Alien converts the first (latest) entry in the changelog when creating the
# .deb and I think this is enough.
#

use strict;
use Getopt::Std;

use constant OPTS => ('r:b:dp:v:R:h');
use constant EXIT_SUCCESS => (0);
use constant EXIT_RPM_FILE => (1);
use constant EXIT_DEB_FILE => (2);
use constant EXIT_NO_DATA => (3);
use constant EXIT_RPM_SYNTAX => (4);
use constant EXIT_SYNTAX_CLI => (5);
use constant EXIT_UNKNOWN => (6);
#----------------------------------------------------------------------------
sub Main();
sub Syntax($);
#----------------------------------------------------------------------------
sub Main()
{
	my %opts = ( );
	my $ret = EXIT_UNKNOWN();
	return EXIT_SYNTAX_CLI() unless ( Getopt(\%opts, OPTS()) );

	if ( $opts{'h'} ) {
		Syntax(1);
		return EXIT_SUCCESS();
	}
	return $ret;
}
#----------------------------------------------------------------------------
sub Syntax($)
{
}
#----------------------------------------------------------------------------
exit Main(); # Entry point.
#----------------------------------------------------------------------------