112 lines
3.9 KiB
RPMSpec
112 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package perl-Dist-Zilla-Plugin-GitObtain
|
|
#
|
|
# 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-GitObtain
|
|
Name: perl-Dist-Zilla-Plugin-GitObtain
|
|
Version: 0.60.0
|
|
Release: 0
|
|
# 0.06 -> normalize -> 0.60.0
|
|
%define cpan_version 0.06
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Obtain files from a git repository before building a distribution
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DU/DUFF/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Dist::Zilla::Role::BeforeBuild)
|
|
BuildRequires: perl(Dist::Zilla::Role::Plugin)
|
|
BuildRequires: perl(File::Path) >= 2.08
|
|
BuildRequires: perl(Git::Wrapper)
|
|
BuildRequires: perl(Moose)
|
|
BuildRequires: perl(namespace::autoclean)
|
|
Requires: perl(Dist::Zilla::Role::BeforeBuild)
|
|
Requires: perl(Dist::Zilla::Role::Plugin)
|
|
Requires: perl(File::Path) >= 2.08
|
|
Requires: perl(Git::Wrapper)
|
|
Requires: perl(Moose)
|
|
Requires: perl(namespace::autoclean)
|
|
Provides: perl(Dist::Zilla::Plugin::GitObtain) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module uses Git::Wrapper to obtain files from git repositories before
|
|
building a distribution.
|
|
|
|
Projects downloaded via git would be placed into the current directory by
|
|
default. To specify an alternate location, use the '--git_dir' option. This
|
|
directory and any intermediate directories in the path will be created if
|
|
they do not already exist.
|
|
|
|
Following the '[GitObtain]' section header is the list of git repositories
|
|
to download and include in the distribution. Each repository is specified
|
|
by the name of the directory in which the repository will be checked out,
|
|
an equals sign ('='), the URL to the git repository, and an optional "tag"
|
|
to checkout. Anything that may be passed to 'git checkout' may be used for
|
|
the "tag"; the default is 'master'. The repository directory will be
|
|
created beneath the path specified in the section heading. So,
|
|
|
|
[GitObtain]
|
|
--git_dir = foo
|
|
my_project = git://github.com/example/my_project.git
|
|
another_project = git://github.com/example/another_project.git
|
|
|
|
will create a _foo_ directory beneath the current directory and
|
|
_my_project_ and _another_project_ directories inside of the _foo_
|
|
directory. Each of the _my_project_ and _another_project_ directories will
|
|
be git repositories.
|
|
|
|
To specify multiple target directories in which to obtain git repositories,
|
|
use alternate section names in the section header:
|
|
|
|
[GitObtain / alpha ]
|
|
--git_dir = foo
|
|
my_project = git://github.com/example/my_project.git
|
|
|
|
[GitObtain / beta ]
|
|
--git_dir = bar
|
|
another_project = git://github.com/example/another_project.git
|
|
|
|
The above example config contains 2 GitObtain sections called 'alpha' and
|
|
'beta'. The 'alpha' section creates repositories in the _foo_ directory and
|
|
the 'beta' section creates repositories in the _bar_ directory.
|
|
|
|
%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 README
|
|
%license LICENSE
|
|
|
|
%changelog
|