From 12e8411b08daea9b296a609e2211d0024aec722e Mon Sep 17 00:00:00 2001 From: Paul Howarth <p...@city-fan.org> Date: Tue, 25 Jul 2017 16:06:04 +0100 Subject: Clean up and build for EPEL-7
- Fix typo in %summary - Add patch to avoid warning from test code about character wrapping - Add patch to avoid use of "use lib" with a relative path in hexdump.pl - Specify all dependencies - No need to remove empty directories from the buildroot - Use DESTDIR rather than PERL_INSTALL_ROOT - Simplify find command using -delete - Drop %defattr, redundant since rpm 4.4 - Drop legacy Group: and BuildRoot: tags - Drop buildroot cleaning in %install section - Drop explicit %clean section - Make %files list more explicit --- ...xDump-0.02-dont-use-lib-in-shipped-script.patch | 9 +++ Data-HexDump-0.02-no-wrap.patch | 11 ++++ perl-Data-HexDump.spec | 65 +++++++++++++++------- 3 files changed, 65 insertions(+), 20 deletions(-) create mode 100644 Data-HexDump-0.02-dont-use-lib-in-shipped-script.patch create mode 100644 Data-HexDump-0.02-no-wrap.patch diff --git a/Data-HexDump-0.02-dont-use-lib-in-shipped-script.patch b/Data-HexDump-0.02-dont-use-lib-in-shipped-script.patch new file mode 100644 index 0000000..14a62fe --- /dev/null +++ b/Data-HexDump-0.02-dont-use-lib-in-shipped-script.patch @@ -0,0 +1,9 @@ +--- hexdump ++++ hexdump +@@ -1,6 +1,5 @@ + #!/usr/bin/perl -w + +-use lib "lib"; + use strict; + use Data::HexDump; + use FileHandle; diff --git a/Data-HexDump-0.02-no-wrap.patch b/Data-HexDump-0.02-no-wrap.patch new file mode 100644 index 0000000..89f28de --- /dev/null +++ b/Data-HexDump-0.02-no-wrap.patch @@ -0,0 +1,11 @@ +--- t/compare.t ++++ t/compare.t +@@ -11,7 +11,7 @@ print "1..2\n"; + # data + my $org = ""; + for (my $i = 0; $i <= 255; $i++) { +- $org .= pack 'c', $i; ++ $org .= pack 'C', $i; + } + $org = $org x 17 . "more data"; + diff --git a/perl-Data-HexDump.spec b/perl-Data-HexDump.spec index 6a2bd07..1b71c99 100644 --- a/perl-Data-HexDump.spec +++ b/perl-Data-HexDump.spec @@ -1,16 +1,30 @@ Name: perl-Data-HexDump Version: 0.02 -Release: 25%{?dist} -Summary: Hexadecial Dumper +Release: 26%{?dist} +Summary: Hexadecimal Dumper License: GPL+ or Artistic -Group: Development/Libraries URL: http://search.cpan.org/dist/Data-HexDump/ Source0: http://www.cpan.org/modules/by-module/Data/Data-HexDump-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: Data-HexDump-0.02-no-wrap.patch +Patch1: Data-HexDump-0.02-dont-use-lib-in-shipped-script.patch BuildArch: noarch +# Module Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl%{?fedora:-interpreter} BuildRequires: perl-generators BuildRequires: perl(ExtUtils::MakeMaker) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +# Module Runtime +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(FileHandle) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +# Test Suite +# (no additional dependencies) +# Dependencies +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Dump in hexadecimal the content of a scalar. The result is returned in a @@ -22,36 +36,47 @@ printable characters (all others are shown as single dots). %prep %setup -q -n Data-HexDump-%{version} +# Avoid warning from test code about character wrapping +%patch0 + +# Shouldn't "use lib" with a relative path in a shipped script +%patch1 + %build -%{__perl} Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install -rm -rf %{buildroot} - -make pure_install PERL_INSTALL_ROOT=%{buildroot} +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +%{_fixperms} %{buildroot} # rename binary not to conflict with util-linux mv %{buildroot}%{_bindir}/hexdump %{buildroot}%{_bindir}/hexdump.pl -find %{buildroot} -type f -name .packlist -exec rm -f {} \; -find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null \; - -chmod -R u+rwX,go+rX,go-w %{buildroot}/* - %check make test -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) %doc README %{_bindir}/hexdump.pl -%{perl_vendorlib}/* -%{_mandir}/man3/* +%{perl_vendorlib}/Data/ +%{_mandir}/man3/Data::HexDump.3* %changelog +* Tue Jul 25 2017 Paul Howarth <p...@city-fan.org> - 0.02-26 +- Fix typo in %%summary +- Add patch to avoid warning from test code about character wrapping +- Add patch to avoid use of "use lib" with a relative path in hexdump.pl +- Specify all dependencies +- No need to remove empty directories from the buildroot +- Use DESTDIR rather than PERL_INSTALL_ROOT +- Simplify find command using -delete +- Drop %%defattr, redundant since rpm 4.4 +- Drop legacy Group: and BuildRoot: tags +- Drop buildroot cleaning in %%install section +- Drop explicit %%clean section +- Make %%files list more explicit + * Sun Jun 04 2017 Jitka Plesnikova <jples...@redhat.com> - 0.02-25 - Perl 5.26 rebuild -- cgit v1.1 https://src.fedoraproject.org/cgit/perl-Data-HexDump.git/commit/?h=epel7&id=12e8411b08daea9b296a609e2211d0024aec722e _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org