89 lines
2.9 KiB
RPMSpec
89 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package perl-Getopt-Lucid
|
|
#
|
|
# 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 Getopt-Lucid
|
|
Name: perl-Getopt-Lucid
|
|
Version: 1.100.0
|
|
Release: 0
|
|
# 1.10 -> normalize -> 1.100.0
|
|
%define cpan_version 1.10
|
|
License: Apache-2.0
|
|
Summary: Clear, readable syntax for command line processing
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Exception::Class) >= 1.23
|
|
BuildRequires: perl(Exception::Class::TryCatch) >= 1.100
|
|
BuildRequires: perl(Storable) >= 2.16
|
|
Requires: perl(Exception::Class) >= 1.23
|
|
Requires: perl(Storable) >= 2.16
|
|
Provides: perl(Getopt::Lucid) = %{version}
|
|
Provides: perl(Getopt::Lucid::Exception) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
The goal of this module is providing good code readability and clarity of
|
|
intent for command-line option processing. While readability is a
|
|
subjective standard, Getopt::Lucid relies on a more verbose, plain-English
|
|
option specification as compared against the more symbolic approach of
|
|
Getopt::Long. Key features include:
|
|
|
|
* Five option types: switches, counters, parameters, lists, and key pairs
|
|
|
|
* Three option styles: long, short (including bundled), and bare (without
|
|
dashes)
|
|
|
|
* Specification of defaults, required options and option dependencies
|
|
|
|
* Validation of options with regexes or subroutines
|
|
|
|
* Negation of options on the command line
|
|
|
|
* Support for parsing any array, not just the default '@ARGV'
|
|
|
|
* Incorporation of external defaults (e.g. from a config file) with user
|
|
control of precedence
|
|
|
|
%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 Changes CONTRIBUTING.mkdn examples README Todo
|
|
%license LICENSE
|
|
|
|
%changelog
|