File perl-cpan2rpm.spec of Package perl-cpan2rpm
#
# spec file for package perl-cpan2rpm
#
# Copyright (c) 2026 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 cpan2rpm
Name: perl-cpan2rpm
Version: 2.048
Release: 0
License: This product is free and distributed under the Gnu Public License (GPL). A copy of this license was included in this distribution in a file called LICENSE. If for some reason, this file was not included, please see _http://www.gnu.org/licenses/_ to obtain a copy of this license. $Id: cpan2rpm,v 2.310 2009-08-12 18:06:16 ekkis Exp $
Summary: Perl module packager
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/B/BB/BBB/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(HTTP::Request)
BuildRequires: perl(LWP::UserAgent)
Requires: perl(HTTP::Request)
Requires: perl(LWP::UserAgent)
%{perl_requires}
%description
This script generates an RPM package from a Perl module. It uses the
standard RPM file structure and creates a spec file, a source RPM, and a
binary, leaving these in their respective directories.
The script can operate on local files, directories, urls and CPAN module
names. Install this package if you want to create RPMs out of Perl modules.
The syntax for cpan2rpm supports multiple _distribution_ names, which can
take one of four different forms:
* 1. *a CPAN module name* (e.g. XML::Simple) - When a module name is
passed, the script will "walk" search.cpan.org to determine the latest
distribution. If an exact match is not found, the CPAN module is used to
make this determination. If you have not yet configured this module,
please refer to the REQUIREMENTS section below for further instructions.
* 2. *a URL* (both _http://_ and _ftp://_ style locators will work) - In
this and the above case, an automatic download of the needed tarball is
performed (see notes for how). The tarball is deposited in the SOURCES
directory.
* 3. *a path to a tarball* (e.g. _/tmp/XML-Simple-1.05.tar.gz_) - In this
case, the tarball indicated gets copied to the SOURCES directory.
* 4. *a directory path* - The directory specified must contain a
_Makefile.PL_. If the user intends to build a package from a directory
(i.e. user does NOT specify *--spec-only*), the commands:
perl Makefile.PL
make
make dist
will be performed in that directory in order to create the tarball
necessary for package creation.
%prep
%autosetup -n %{cpan_name}-%{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 cpan2rpm perl.req.patch README README.redhat6
%license LICENSE
%changelog