Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Module-Install-AuthorRequires
perl-Module-Install-AuthorRequires.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Module-Install-AuthorRequires.spec of Package perl-Module-Install-AuthorRequires
# vim: set sw=4 ts=4 et nu: # # spec file for package perl-Module-Install-AuthorRequires # # Copyright (c) 2021 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/ # Name: perl-Module-Install-AuthorRequires Version: 0.02 Release: 0 Summary: Declare author-only dependencies License: Artistic-1.0 OR GPL-2.0-or-later Group: Development/Libraries/Perl Source: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Module-Install-AuthorRequires-%{version}.tar.gz URL: http://search.cpan.org/dist/Module-Install-AuthorRequires BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} BuildRequires: make BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42 BuildRequires: perl(Module::Install) Requires: perl(Module::Install) %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description Modules often have optional requirements, for example dependencies that are useful for (optional) tests, but not required for the module to work properly. Usually you want all developers of a project to have these optional modules installed. However, simply telling everyone or printing diagnostic messages if optional dependencies are missing often isn't enough to make sure all authors have all optional modules installed. "Module::Install" already has a way of detecting an author environment, so an easy way to achieve the above would be something like: if ($Module::Install::AUTHOR) { requires 'Some::Module'; requires 'Another::Module' => '0.42'; } Unfortunately, that'll also make the optional dependencies show up in the distributions "META.yml" file, which is obviously wrong, as they aren't actually hard requirements. Working that around requires a considerable amount of non-trivial Makefile.PL hackery, or simply using this module's "author_requires" command. %prep %setup -q -n "Module-Install-AuthorRequires-%{version}" %__sed -i '/^auto_install/d' Makefile.PL %build %__perl Makefile.PL PREFIX="%{_prefix}" %__make %{?_smp_flags} %install %perl_make_install %perl_process_packlist %check %__make test %clean %{?buildroot:%__rm -rf "%{buildroot}"} %files %defattr(-,root,root) %doc Changes README %dir %{perl_vendorlib}/Module %dir %{perl_vendorlib}/Module/Install %{perl_vendorlib}/Module/Install/AuthorRequires.pm %dir %{perl_vendorlib}/Module/Install/Admin %{perl_vendorlib}/Module/Install/Admin/AuthorRequires.pm %doc %{perl_man3dir}/Module::Install::AuthorRequires.%{perl_man3ext}%{ext_man} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor