Files
perl-Dist-Zilla-Plugin-Chec…/perl-Dist-Zilla-Plugin-CheckChangesHasContent.spec
2025-08-12 18:13:38 +02:00

122 lines
4.1 KiB
RPMSpec

#
# spec file for package perl-Dist-Zilla-Plugin-CheckChangesHasContent
#
# 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-Plugin-CheckChangesHasContent
Name: perl-Dist-Zilla-Plugin-CheckChangesHasContent
Version: 0.11.0
Release: 0
# 0.011 -> normalize -> 0.11.0
%define cpan_version 0.011
License: Apache-2.0
Summary: Ensure Changes has content before releasing
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(Capture::Tiny)
BuildRequires: perl(Data::Section) >= 0.200002
BuildRequires: perl(Dist::Zilla) >= 6
BuildRequires: perl(Dist::Zilla::File::InMemory)
BuildRequires: perl(Dist::Zilla::Role::BeforeRelease)
BuildRequires: perl(Dist::Zilla::Role::FileGatherer)
BuildRequires: perl(Dist::Zilla::Role::FileMunger)
BuildRequires: perl(Dist::Zilla::Role::TextTemplate)
BuildRequires: perl(Dist::Zilla::Tester)
BuildRequires: perl(Moose) >= 2
BuildRequires: perl(Moose::Util::TypeConstraints)
BuildRequires: perl(Path::Tiny)
BuildRequires: perl(Sub::Exporter::ForMethods)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(autodie) >= 2.00
BuildRequires: perl(namespace::autoclean) >= 0.28
Requires: perl(Data::Section) >= 0.200002
Requires: perl(Dist::Zilla) >= 6
Requires: perl(Dist::Zilla::File::InMemory)
Requires: perl(Dist::Zilla::Role::BeforeRelease)
Requires: perl(Dist::Zilla::Role::FileGatherer)
Requires: perl(Dist::Zilla::Role::FileMunger)
Requires: perl(Dist::Zilla::Role::TextTemplate)
Requires: perl(Moose) >= 2
Requires: perl(Moose::Util::TypeConstraints)
Requires: perl(Sub::Exporter::ForMethods)
Requires: perl(autodie) >= 2.00
Requires: perl(namespace::autoclean) >= 0.28
Provides: perl(Dist::Zilla::Plugin::CheckChangesHasContent) = %{version}
Provides: perl(Dist::Zilla::Plugin::Test::ChangesHasContent) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This is a "before release" Dist::Zilla plugin that ensures that your
Changes file actually has some content since the last release. If it
doesn't find any, it will abort the release process.
This can be contrasted to Dist::Zilla::Plugin::Test::ChangesHasContent,
which generates a test to perform the check.
The algorithm is very naive. It looks for an unindented line starting with
the version to be released. It then looks for any text from that line until
the next unindented line (or the end of the file), ignoring whitespace.
For example, in the file below, algorithm will find "- blah blah blah":
Changes file for Foo-Bar
{{$NEXT}}
- blah blah blah
0.001 Wed May 12 13:49:13 EDT 2010
- the first release
If you had nothing but whitespace between '{{$NEXT}}' and '0.001', the
release would be halted.
If you name your change log something other than "Changes", you can
configure the name with the 'changelog' argument:
[CheckChangesHasContent]
changelog = ChangeLog
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
export TZ=US/Central
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes CONTRIBUTING.mkdn README
%license LICENSE
%changelog