public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cpanspec] epel10: Update to actual Fedora rules
@ 2026-10-21 16:04 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-10-21 16:04 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/cpanspec
Branch : epel10
Commit : ab89664e67b73a3706ba2bd0128c2afe3d6fa964
Author : Michal Josef Špaček <mspacek@redhat.com>
Date   : 2024-12-05T16:46:32+01:00
Stats  : +227/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/cpanspec/c/ab89664e67b73a3706ba2bd0128c2afe3d6fa964?branch=epel10

Log:
Update to actual Fedora rules

---
diff --git a/cpanspec-1.78-Update_to_actual_fedora_rules.patch b/cpanspec-1.78-Update_to_actual_fedora_rules.patch
new file mode 100644
index 0000000..1b4363b
--- /dev/null
+++ b/cpanspec-1.78-Update_to_actual_fedora_rules.patch
@@ -0,0 +1,221 @@
+diff --git a/cpanspec b/cpanspec
+index e14a7ce..451c4f8 100755
+--- a/cpanspec
++++ b/cpanspec
+@@ -688,7 +688,7 @@ for my $file (@args) {
+         next;
+     }
+ 
+-    my $url="http://search.cpan.org/dist/$name/";
++    my $url="https://metacpan.org/dist/$name";
+ 
+     $source=$source || "http://www.cpan.org/modules/by-module/"
+         . ($module=~/::/ ? (split "::", $module)[0] : (split "-", $name)[0])
+@@ -729,10 +729,13 @@ for my $file (@args) {
+             and $_ ne "INSTALL"
+             and $_ ne "SIGNATURE"
+             and $_ ne "META.yml"
++            and $_ ne "META.json"
+             and $_ ne "NINJA"
+             and $_ ne "configure"
+             and $_ ne "config.guess"
+             and $_ ne "config.sub"
++            and $_ ne "cpanfile"
++            and $_ ne "dist.ini"
+             and $_ ne "typemap"
+             and $_ ne "bin"
+             and $_ ne "lib"
+@@ -741,6 +744,42 @@ for my $file (@args) {
+             and $_ ne "autobuild.sh"
+             and $_ ne "pm_to_blib"
+             and $_ ne "install.sh"
++            # License files
++            and $_ ne "LICENSE"
++            and $_ ne "LICENCE"
++            and $_ ne "Copying"
++            and $_ ne "COPYING"
++            and $_ ne "COPYING.Artistic"
++            and $_ ne "COPYING.GNU"
++            and $_ ne "COPYRIGHT"
++            and $_ ne "ARTISTIC.txt"
++            and $_ ne "Artistic"
++            and $_ ne "Artistic.txt"
++            and $_ ne "GNU_GPL.txt"
++            and $_ ne "GNU_LGPL.txt"
++            and $_ ne "GPL"
++            and $_ ne "GPLv1"
++            and $_ ne "GPL2.txt"
++            and $_ ne "DISCLAIMER.txt"
++            } @files;
++
++    my @license=sort { $a cmp $b } grep {
++               $_ eq "LICENSE"
++            or $_ eq "LICENCE"
++            or $_ eq "Copying"
++            or $_ eq "COPYING"
++            or $_ eq "COPYING.Artistic"
++            or $_ eq "COPYING.GNU"
++            or $_ eq "COPYRIGHT"
++            or $_ eq "ARTISTIC.txt"
++            or $_ eq "Artistic"
++            or $_ eq "Artistic.txt"
++            or $_ eq "GNU_GPL.txt"
++            or $_ eq "GNU_LGPL.txt"
++            or $_ eq "GPL"
++            or $_ eq "GPLv1"
++            or $_ eq "GPL2.txt"
++            or $_ eq "DISCLAIMER.txt"
+             } @files;
+ 
+     my $date=strftime("%a %b %d %Y", localtime);
+@@ -811,7 +850,7 @@ for my $file (@args) {
+         next;
+     }
+ 
+-    print $spec qq[\%{!?perl_$vendorlib: \%define perl_$vendorlib \%(eval "\`\%{__perl} -V:install$vendorlib\`"; echo \$install$vendorlib)}\n\n]
++    print $spec qq[\%{!?perl_$vendorlib: \%define perl_$vendorlib \%(eval "\`perl -V:install$vendorlib\`"; echo \$install$vendorlib)}\n\n]
+         if ($compat);
+ 
+     my $license="";
+@@ -963,10 +1002,8 @@ END
+     print $spec <<END;
+ Summary:        $summary
+ License:        $license
+-Group:          Development/Libraries
+ URL:            $url
+ Source0:        $source
+-BuildRoot:      \%{_tmppath}/\%{name}-\%{version}-\%{release}-root-\%(\%{__id_u} -n)
+ END
+ 
+     printf $spec "%-16s%s\n", "BuildArch:", "noarch" if ($noarch);
+@@ -976,11 +1013,31 @@ END
+         delete $requires{perl};
+     }
+ 
++    if (! $usebuildpl) {
++        printf $spec "%-16s%s\n", "BuildRequires:", 'make';
++    }
++    printf $spec "%-16s%s\n", 'BuildRequires:', 'perl-generators';
++    printf $spec "%-16s%s\n", 'BuildRequires:', 'perl-interpreter';
++
+     if (defined($build_requires{perl})) {
+         $build_requires{perl} =~ s/^[<>=]+ *//;
+-        printf $spec "%-16s%s >= %s\n", "BuildRequires:", "perl",
+-            (($build_requires{perl} lt "5.6.0" ? "0:" : "1:")
+-            . $build_requires{perl}) if $build_requires{perl};
++
++        # Convert decimal version to dotted
++        if ($build_requires{perl} =~ /^v?(\d+)\.(\d{3})(\d{3})?/) {
++            $build_requires{perl} = int($1).'.'.int($2);
++            if ($3) {
++                $build_requires{perl} .= '.'.int($3);
++            } else {
++                $build_requires{perl} .= '.0';
++            }
++
++        # Remove 'v' on begin
++        } elsif ($build_requires{perl} =~ m/^v(.*)$/ms) {
++            $build_requires{perl} = $1;
++        }
++
++        printf $spec "%-16s%s >= %s\n", "BuildRequires:", "perl(:VERSION)", $build_requires{perl}
++            if $build_requires{perl};
+         delete $build_requires{perl};
+     }
+ 
+@@ -1013,21 +1070,17 @@ END
+ 
+     for my $dep (sort(keys(%requires))) {
+         next if (!$compat and exists($corelist{$dep}));
+-        printf $spec "%-16s%s", "Requires:", "perl($dep)";
+-        print $spec (" >= " . $requires{$dep}) if ($requires{$dep});
+-        print $spec "\n";
++        if ($requires{$dep}) {
++            printf $spec "%-16s%s", "Requires:", "perl($dep)";
++            print $spec (" >= " . $requires{$dep});
++            print $spec "\n";
++        }
+     }
+ 
+     for my $dep (@add_requires) {
+         printf $spec "%-16s%s\n", "Requires:", $dep;
+     }
+ 
+-    if (!$compat) {
+-        print $spec <<END;
+-Requires:       perl(:MODULE_COMPAT_\%(eval "`\%{__perl} -V:version`"; echo \$version))
+-END
+-    }
+-
+     for my $prov (@add_provides) {
+         printf $spec "%-16s%s\n", "Provides:", $prov;
+     }
+@@ -1091,28 +1144,26 @@ END
+ 
+     if ($usebuildpl) {
+         print $spec <<END;
+-\%{__perl} Build.PL --installdirs=vendor@{[$noarch ? '' : qq{ --optimize="$macro{optimize}"} ]}
++perl Build.PL --installdirs=vendor@{[$noarch ? '' : qq{ --optimize="$macro{optimize}"} ]}
+ ./Build
+ END
+     } else {
+         print $spec <<END;
+-\%{__perl} Makefile.PL INSTALLDIRS=vendor@{[$noarch ? '' : qq{ OPTIMIZE="$macro{optimize}"}]}
++perl Makefile.PL INSTALLDIRS=vendor@{[$noarch ? '' : qq{ OPTIMIZE="$macro{optimize}"}]} NO_PACKLIST=1 NO_PERLLOCAL=1
+ END
+ 
+         print $spec
+-            "\%{__perl} -pi -e 's/^\\tLD_RUN_PATH=[^\\s]+\\s*/\\t/' Makefile\n"
++            "perl -pi -e 's/^\\tLD_RUN_PATH=[^\\s]+\\s*/\\t/' Makefile\n"
+             if ($compat and !$noarch);
+ 
+         print $spec <<END;
+-make \%{?_smp_mflags}
++%{make_build}
+ END
+     }
+ 
+     print $spec <<END;
+ 
+ \%install
+-rm -rf $macro{buildroot}
+-
+ END
+ 
+     if ($usebuildpl) {
+@@ -1120,9 +1171,7 @@ END
+             "./Build install --destdir=$macro{buildroot} --create_packlist=0\n";
+     } else {
+         print $spec <<END;
+-make pure_install PERL_INSTALL_ROOT=$macro{buildroot}
+-
+-find $macro{buildroot} -type f -name .packlist -exec rm -f {} \\;
++%{make_install}
+ END
+     }
+ 
+@@ -1133,8 +1182,6 @@ END
+ }
+ 
+     print $spec <<END;
+-find $macro{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \\;
+-
+ \%{_fixperms} $macro{buildroot}/*
+ 
+ END
+@@ -1160,14 +1207,9 @@ END
+ 
+     print $spec <<END;
+ 
+-\%clean
+-rm -rf $macro{buildroot}@{[
+-    (@filter_requires ? ' %{__perl_requires}' : '') .
+-    (@filter_provides ? ' %{__perl_provides}' : '')]}
+-
+ \%files
+-\%defattr(-,root,root,-)
+ \%doc @doc
++\%license @license
+ END
+ 
+     if ($scripts) {

diff --git a/cpanspec.spec b/cpanspec.spec
index 5e589fe..a167f5e 100644
--- a/cpanspec.spec
+++ b/cpanspec.spec
@@ -1,6 +1,6 @@
 Name:           cpanspec
 Version:        1.78
-Release:        52%{?dist}
+Release:        53%{?dist}
 Summary:        RPM spec file generation utility
 License:        GPL-1.0-or-later OR Artistic-1.0-Perl
 URL:            http://cpanspec.sourceforge.net/
@@ -11,6 +11,7 @@ Patch2:         %{name}-1.78-Escape-slashes-in-filters.patch
 Patch3:         %{name}-1.78-Prefer-dnf-over-repoquery.patch
 Patch4:         %{name}-1.78-Fix-build-arguments-for-Build.PL-spec-conformance.patch
 Patch5:         %{name}-1.78-Update-licenses-to-SPDX-form.patch
+Patch6:         %{name}-1.78-Update_to_actual_fedora_rules.patch
 BuildArch:      noarch
 BuildRequires:  findutils
 BuildRequires:  perl-interpreter
@@ -36,6 +37,7 @@ contained in the spec file is correct.
 %patch -P3 -p1
 %patch -P4 -p1
 %patch -P5 -p1
+%patch -P6 -p1
 
 %build
 perl Build.PL installdirs=vendor
@@ -54,6 +56,9 @@ find %{buildroot} -type f -name .packlist -delete
 %{_mandir}/man1/*
 
 %changelog
+* Thu Dec 05 2024 Michal Josef Špaček <mspacek@redhat.com> - 1.78-53
+- Update to actual Fedora rules
+
 * Fri Nov 08 2024 Michal Josef Špaček <mspacek@redhat.com> - 1.78-52
 - Update licenses to SPDX form
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-21 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 16:04 [rpms/cpanspec] epel10: Update to actual Fedora rules 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox