78 lines
2.7 KiB
RPMSpec
78 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package perl-Argv
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Argv
|
|
Name: perl-Argv
|
|
Version: 1.280.0
|
|
Release: 0
|
|
# 1.28 -> normalize -> 1.280.0
|
|
%define cpan_version 1.28
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Provide an OO interface to an arg vector
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DS/DSB/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
Provides: perl(Argv) = %{version}
|
|
Provides: perl(Argv::Win32Utils)
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
An Argv object treats a command line as 3 separate entities: the _program_,
|
|
the _options_, and the _args_. The _options_ may be further subdivided into
|
|
user-defined _option sets_ by use of the 'optset' method. When one of the
|
|
_execution methods_ is called, the parts are reassembled into a single list
|
|
and passed to the underlying Perl execution function.
|
|
|
|
Compare this with the way Perl works natively, keeping the 0th element of
|
|
the argv in '$0' and the rest in '@ARGV'.
|
|
|
|
By default there's one option set, known as the _anonymous option set_,
|
|
whose name is the null string. All parsed options go there. The advanced
|
|
user can define more option sets, parse options into them according to
|
|
Getopt::Long-style descriptions, query or set the parsed values, and then
|
|
reassemble them in any way desired at exec time. Declaring an option set
|
|
automatically generates a set of methods for manipulating it (see below).
|
|
|
|
All argument-parsing within Argv is done via Getopt::Long.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Argv.html Changes examples README
|
|
|
|
%changelog
|