Files
perl-Dist-Zilla-Plugin-GitF…/perl-Dist-Zilla-Plugin-GitFmtChanges.spec
2025-08-12 18:13:40 +02:00

121 lines
3.8 KiB
RPMSpec

#
# spec file for package perl-Dist-Zilla-Plugin-GitFmtChanges
#
# 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-GitFmtChanges
Name: perl-Dist-Zilla-Plugin-GitFmtChanges
Version: 0.6.0
Release: 0
# 0.006 -> normalize -> 0.6.0
%define cpan_version 0.006
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Build CHANGES file from a project's git log using git log format
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/R/RU/RUBYKAT/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Date::Simple)
BuildRequires: perl(Dist::Zilla::Role::FileGatherer)
BuildRequires: perl(Git::Wrapper)
BuildRequires: perl(Moose)
Requires: perl(Date::Simple)
Requires: perl(Dist::Zilla::Role::FileGatherer)
Requires: perl(Git::Wrapper)
Requires: perl(Moose)
Provides: perl(Dist::Zilla::Plugin::GitFmtChanges) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This Dist::Zilla plugin writes a CHANGES file that contains formatted
commit information from recent git logs. The CHANGES file is formatted
using the "--format" option of the git log command. This makes it easy to
make the CHANGES file look the way you want it to.
This is based on Dist::Zilla::Plugin::ChangelogFromGit.
This plugin has the following configuration variables:
* * max_age
It may be impractical to include the full change log in a mature project's
distribution. "max_age" limits the changes to the most recent ones within a
number of days. The default is about one year.
Include two years of changes:
max_age = 730
* * tag_regexp
This plugin breaks the changelog into sections delineated by releases,
which are defined by release tags. "tag_regexp" may be used to focus only
on those tags that follow a particular release tagging format. Some of the
author's repositories contain multiple projects, each with their own
specific release tag formats, so that changelogs can focus on particular
projects' tags. For instance, POE::Test::Loops' release tags may be
specified as:
tag_regexp = ^ptl-
* * file_name
Everyone has a preference for their change logs. If you prefer lowercase in
your change log file names, you might specify:
file_name = Changes
* * log_format
Define the format used for the change listing in the CHANGES file. This
option is passed through to the *git log* command. One can use the
predefined formats, such as 'oneline', 'short', 'medium' etc.
log_format = short
Or one can exersize more control by using the "format" formatting. The
following example will give the author and date, a newline, and the
"subject" of the change.
log_format = %ai%n%s
%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 README README.mkdn
%license LICENSE
%changelog