Files
perl-Dist-Zilla-Role-Bootstrap/perl-Dist-Zilla-Role-Bootstrap.spec
2025-08-12 18:13:46 +02:00

102 lines
3.0 KiB
RPMSpec

#
# spec file for package perl-Dist-Zilla-Role-Bootstrap
#
# 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 Dist-Zilla-Role-Bootstrap
Name: perl-Dist-Zilla-Role-Bootstrap
Version: 1.1.4
Release: 0
# 1.001004 -> normalize -> 1.1.4
%define cpan_version 1.001004
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Shared logic for bootstrap things
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/K/KE/KENTNL/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Dist::Zilla::Chrome::Test)
BuildRequires: perl(Dist::Zilla::Dist::Builder)
BuildRequires: perl(Dist::Zilla::MVP::Assembler::Zilla)
BuildRequires: perl(Dist::Zilla::MVP::Section)
BuildRequires: perl(Dist::Zilla::Role::Plugin)
BuildRequires: perl(File::Copy::Recursive)
BuildRequires: perl(List::UtilsBy)
BuildRequires: perl(Moose)
BuildRequires: perl(Moose::Role)
BuildRequires: perl(Path::Tiny)
BuildRequires: perl(version)
Requires: perl(Dist::Zilla::Role::Plugin)
Requires: perl(List::UtilsBy)
Requires: perl(Moose::Role)
Requires: perl(Path::Tiny)
Requires: perl(version)
Provides: perl(Dist::Zilla::Role::Bootstrap) = %{version}
%undefine __perllib_provides
Recommends: perl(Path::Tiny) >= 0.058
%{perl_requires}
%description
This module is a role that aims to be consumed by plugins that want to
perform some very early bootstrap operation that may affect the loading
environment of successive plugins, especially with regards to plugins that
may wish to build with themselves, either by consuming the source tree
itself, or by consuming a previous built iteration.
Implementation is quite simple:
* 1. 'with' this role in your plugin
with 'Dist::Zilla::Role::Bootstrap'
* 2. Implement the 'bootstrap' sub.
sub bootstrap {
my ( $self ) = @_;
}
* 3. _Optional_: Fetch the discovered 'bootstap' root via:
$self->_bootstap_root
* 4. _Optional_: Load some path into '@INC' via:
$self->_add_inc($path)
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%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 README
%license LICENSE
%changelog