8
0
forked from pool/perl-App-CLI

Accepting request 507559 from devel:languages:perl:autoupdate

automatic update

OBS-URL: https://build.opensuse.org/request/show/507559
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-App-CLI?expand=0&rev=26
This commit is contained in:
Stephan Kulow
2017-07-11 09:51:25 +00:00
committed by Git OBS Bridge
parent dd0b2d3891
commit c44ae3d915
5 changed files with 108 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-App-CLI
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,23 +16,24 @@
#
Name: perl-App-CLI
Version: 0.313
Release: 2
License: GPL+ or Artistic
Version: 0.45
Release: 0
%define cpan_name App-CLI
Summary: Dispatcher module for command line interface programs
Url: http://search.cpan.org/dist/App-CLI/
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/C/CO/CORNELIUS/App-CLI-%{version}.tar.gz
Url: http://search.cpan.org/dist/App-CLI/
Source0: https://cpan.metacpan.org/authors/id/P/PT/PTC/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Locale::Maketext::Simple)
BuildRequires: perl(Getopt::Long) >= 2.35
BuildRequires: perl(Pod::Simple::Text)
Requires: perl(Locale::Maketext::Simple)
Requires: perl(Pod::Simple::Text)
%{perl_requires}
%description
@@ -40,24 +41,21 @@ BuildRequires: perl(Pod::Simple::Text)
command classes. It also supports subcommand and per-command options.
get_opt([@config], %opt_map)
give options map, process by Getopt::Long::Parser
Give options map, processed by Getopt::Long::Parser.
interface of dispatcher
Interface of dispatcher
cmd_map($cmd)
find package name of subcommand in constant %alias
Find package name of subcommand in constant '%alias'.
if it's finded, return ucfirst of the package name,
otherwise, return ucfirst of $cmd itself.
If it's found, return 'ucfirst' of the package name, otherwise, return
'ucfirst' of '$cmd' itself.
get_cmd($cmd, @arg)
return subcommand of first level via $ARGV[0]
Return subcommand of first level via '$ARGV[0]'.
%prep
%setup -q -n %{cpan_name}-%{version}
# disable auto_install();
%{__perl} -p -i -e 's|^auto_install.*|#(1)|' Makefile.PL
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -71,11 +69,8 @@ get_cmd($cmd, @arg)
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(644,root,root,755)
%doc Changes
%defattr(-,root,root,755)
%doc Changes README.md
%changelog