# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Create bubble-babble fingerprints Name: perl-Digest-BubbleBabble Version: 0.02 Release: 36.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Digest-BubbleBabble Source0: https://cpan.metacpan.org/modules/by-module/Digest/Digest-BubbleBabble-%{version}.tar.gz Patch0: Digest-BubbleBabble-0.02-Fix-building-on-Perl-without-dot-in-INC.patch BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter # Dependencies of bundled Module::Install BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(Cwd) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::Manifest) BuildRequires: perl(Fcntl) BuildRequires: perl(File::Find) BuildRequires: perl(File::Path) BuildRequires: perl(File::Spec) BuildRequires: perl(FindBin) BuildRequires: perl(JSON) BuildRequires: perl(Parse::CPAN::Meta) BuildRequires: perl(Pod::Text) BuildRequires: perl(warnings) BuildRequires: perl(YAML::Tiny) # Module Runtime BuildRequires: perl(Exporter) BuildRequires: perl(strict) BuildRequires: perl(vars) # Test Suite BuildRequires: perl(Test::More) # Additional dependencies of bundled test modules Spiffy and Test::Base BuildRequires: perl(Data::Dumper) BuildRequires: perl(Filter::Util::Call) BuildRequires: perl(MIME::Base64) BuildRequires: perl(overload) BuildRequires: perl(PerlIO) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Test::Deep) BuildRequires: perl(Text::Diff) BuildRequires: perl(threads::shared) BuildRequires: perl(YAML) # Extra Tests BuildRequires: perl(Digest::SHA1) BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Synopsis) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description Digest::BubbleBabble takes a message digest (generated by either of the MD5 or SHA-1 message digest algorithms) and creates a fingerprint of that digest in "bubble babble" format. Bubble babble is a method of representing a message digest as a string of "real" words, to make the fingerprint easier to remember. The "words" are not necessarily real words, but they look more like words than a string of hex characters. Bubble babble fingerprinting is used by the SSH2 suite (and, consequently, by Net::SSH::Perl, the Perl SSH implementation) to display easy-to-remember key fingerprints. The key (a DSA or RSA key) is converted into a textual form, digested using Digest::SHA1, and run through bubblebabble to create the key fingerprint. %prep %setup -q -n Digest-BubbleBabble-%{version} # Remove bundled Test::Builder and Test::More rm -v inc/Test/{Builder,More}.pm sed -i -e '/^inc\/Test\/Builder\.pm/ d' MANIFEST sed -i -e '/^inc\/Test\/More\.pm/ d' MANIFEST # Fix building on Perls without '.' in @INC (CPAN RT#120808) %patch -P 0 %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test make test TEST_FILES="xt/*.t" %files %doc Changes README %{perl_vendorlib}/Digest/ %{_mandir}/man3/Digest::BubbleBabble.3* %changelog * Wed Apr 5 2023 Paul Howarth - 0.02-36 - Use SPDX-format license tag - Avoid use of deprecated patch syntax * Fri Jun 26 2020 Paul Howarth - 0.02-28 - Remove bundled Test::Builder and Test::More * Tue Jun 4 2019 Paul Howarth - 0.02-25 - Perl 5.30 rebuild * Fri Jul 6 2018 Paul Howarth - 0.02-22 - Switch upstream from search.cpan.org to metacpan.org - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Tue Jun 13 2017 Paul Howarth - 0.02-18 - Fix building on Perls without '.' in @INC (CPAN RT#120808) - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Thu Aug 18 2016 Paul Howarth - 0.02-15 - Classify buildreqs by usage - Simplify find command using -delete * Thu Aug 28 2014 Paul Howarth - 0.02-10 - Drop %%defattr, redundant since rpm 4.4 * Tue Jun 26 2012 Paul Howarth - 0.02-4 - BR: perl(Carp) and perl(Exporter) - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Drop patch for Perl 5.8.0 support - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT * Fri Jun 24 2011 Paul Howarth - 0.02-2 - Rebuild for perl 5.14.1 in Rawhide - Fix dist tag for CentOS 6 and Scientific Linux * Thu Mar 24 2011 Paul Howarth - 0.02-1 - Update to 0.02: - Fixed a bug affecting input strings with an odd number of characters - Cleaned up Makefile.PL - Removed magic svn keywords - Added author tests (xt/) and modified SYNOPSIS for all modules to make them pass the compilation test - New buildreqs perl(Test::Pod) and perl(Test::Synopsis) for author tests - Add patch to support build and use with Perl 5.8.0 - Nobody else likes macros for commands * Fri Jun 25 2010 Paul Howarth - 0.01-7 - Rebuild for perl 5.12.1 in Rawhide * Fri May 7 2010 Paul Howarth - 0.01-6 - Fix dist tag to work with RHEL6 Beta * Sat Feb 20 2010 Paul Howarth - 0.01-5 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Wed Sep 9 2009 Paul Howarth - 0.01-4 - Define RPM macros in global scope * Wed Nov 5 2008 Paul Howarth - 0.01-3 - Tweak dist tag macros to work on current Rawhide with three-part releasenum - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) * Mon Mar 19 2007 Paul Howarth - 0.01-2 - Fix dist tag for development builds and Fedora 7 onwards - Fix argument order for find with -depth - Define %%{__id_u} in a more portable way - BuildRequire perl(ExtUtils::MakeMaker) * Thu Dec 8 2005 Paul Howarth - 0.01-1 - Initial build