Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > f437382b5e09b3ac599e74929ad645cb > files > 3

biber-2.18-1.mga9.src.rpm

# Perform developer tests which exhibit a biber executable
%bcond_with biber_enables_extra_test

Name:           biber
Version:        2.18
Release:        1%{?dist}
Summary:        Command-line bibliographic manager, BibTeX replacement
Group:          Publishing
# bin/biber:        Artistic 2.0
# data/texmap.xsl:  Artistic 2.0
# doc/biber.tex:    Artistic 2.0
# lib/Biber.pm:     Artistic 2.0
# lib/Biber/LaTeX/recode_data.xml:  Artistic 2.0
# README.md:        Artistic 2.0
## Not in any binary package
# Build.PL:         GPL+ or Artistic
## Not used at all
# etc/bibtex.g:     GPLv2+
# etc/parser.dlg:   GPLv2+ (generated from etc/bibtex.g)
# etc/tugboat.bib:  Public Domain
License:        (GPL+ or Artistic 2.0) and Artistic 2.0
URL:            http://biblatex-biber.sourceforge.net/
Source0:        https://github.com/plk/biber/archive/v%{version}.tar.gz
# not appropriate for upstream: https://github.com/plk/biber/pull/97
Patch0:         biber-drop-builddeps-for-monolithic-build.patch
Patch1:         biber-2.16-Normalize-shebangs.patch
BuildArch:      noarch
BuildRequires:  coreutils
BuildRequires:  perl
BuildRequires:  perl(Config)
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(strict)
BuildRequires:  perl(utf8)
BuildRequires:  perl(warnings)
# Run-time:
BuildRequires:  perl(autovivification)
BuildRequires:  perl(Business::ISBN)
BuildRequires:  perl(Business::ISMN)
BuildRequires:  perl(Business::ISSN)
BuildRequires:  perl(Carp)
BuildRequires:  perl(Class::Accessor)
BuildRequires:  perl(constant)
BuildRequires:  perl(Cwd)
BuildRequires:  perl(Data::Compare)
BuildRequires:  perl(Data::Dump)
BuildRequires:  perl(Data::Uniqid)
BuildRequires:  perl(DateTime)
BuildRequires:  perl(DateTime::Calendar::Julian)
BuildRequires:  perl(DateTime::Format::Builder)
BuildRequires:  perl(DateTime::TimeZone)
BuildRequires:  perl(Digest::MD5)
BuildRequires:  perl(Encode)
BuildRequires:  perl(Encode::Alias)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(File::Copy)
# File::DosGlob not used on Linux
BuildRequires:  perl(File::Find)
BuildRequires:  perl(File::Slurper)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(File::Temp)
%if %{with biber_enables_extra_test}
BuildRequires:  perl(Getopt::Long)
%endif
BuildRequires:  perl(IO::File)
BuildRequires:  perl(IO::String)
BuildRequires:  perl(IPC::Cmd)
BuildRequires:  perl(IPC::Run3)
BuildRequires:  perl(Lingua::Translit) >= 0.28
BuildRequires:  perl(List::AllUtils)
BuildRequires:  perl(List::Util)
BuildRequires:  perl(locale)
BuildRequires:  perl(Log::Log4perl)
BuildRequires:  perl(Log::Log4perl::Appender::File)
BuildRequires:  perl(Log::Log4perl::Appender::Screen)
BuildRequires:  perl(Log::Log4perl::Layout::PatternLayout)
BuildRequires:  perl(Log::Log4perl::Layout::SimpleLayout)
%if %{with biber_enables_extra_test}
BuildRequires:  perl(Log::Log4perl::Level)
%endif
BuildRequires:  perl(LWP::Protocol::https)
BuildRequires:  perl(LWP::UserAgent)
# Mozilla::CA is not helpful
BuildRequires:  perl(parent)
BuildRequires:  perl(Parse::RecDescent)
%if %{with biber_enables_extra_test}
BuildRequires:  perl(Pod::Usage)
%endif
BuildRequires:  perl(POSIX)
BuildRequires:  perl(Regexp::Common)
BuildRequires:  perl(Scalar::Util)
BuildRequires:  perl(sigtrap)
BuildRequires:  perl(Sort::Key)
BuildRequires:  perl(Storable)
BuildRequires:  perl(Text::BibTeX) >= 0.88
BuildRequires:  perl(Text::BibTeX::Name)
BuildRequires:  perl(Text::BibTeX::NameFormat)
BuildRequires:  perl(Text::CSV)
BuildRequires:  perl(Text::Roman)
BuildRequires:  perl(Text::Wrap)
# Unicode::Collate::Locale version from Unicode::Collate in Build.PL
BuildRequires:  perl(Unicode::Collate::Locale) >= 1.29
BuildRequires:  perl(Unicode::GCString)
BuildRequires:  perl(Unicode::Normalize) >= 1.26
BuildRequires:  perl(Unicode::UCD)
BuildRequires:  perl(URI)
BuildRequires:  perl(vars)
# Win32* not used on Linux
BuildRequires:  perl(XML::LibXML)
BuildRequires:  perl(XML::LibXML::Simple)
BuildRequires:  perl(XML::LibXSLT)
BuildRequires:  perl(XML::Writer)
# Tests:
BuildRequires:  perl(Capture::Tiny)
BuildRequires:  perl(File::Which)
BuildRequires:  perl(open)
BuildRequires:  perl(Test::Differences)
BuildRequires:  perl(Test::More)
# Optional tests:
# texlive-plain not helpful; The only "plain.tex" usage in t/utils.t checks
# that it exist on a file system.
# It would also create a build cycle: texlive-plain → texlive-biblatex → biber
# Extra tests:
%if %{with biber_enables_extra_test}
BuildRequires:  perl(File::Compare)
%endif
Requires:       perl(autovivification)
Requires:       perl(Business::ISBN)
Requires:       perl(Business::ISMN)
Requires:       perl(Business::ISSN)
Requires:       perl(Lingua::Translit) >= 0.28
Requires:       perl(LWP::UserAgent)
Requires:       perl(LWP::Protocol::https)
Requires:       perl(Text::BibTeX) >= 0.88
# Unicode::Collate::Locale version from Unicode::Collate in Build.PL
Requires:       perl(Unicode::Collate::Locale) >= 1.29
Requires:       perl(XML::LibXSLT)
# Biber does not use biblatex, but it expects a compatible biblatex file format
# (see doc/biber.tex "Compatibility Matrix"):
#     biber | texlive-biblatex
#     ------+-----------------
#     1.8   | 2.8a
#     2.1   | 3.0
#     2.6   | 3.5, 3.6
#     2.7   | 3.7       (bug #1401482)
#     2.8   | 3.8
#     2.9   | 3.9
#     2.10  | 3.10
#     2.11  | 3.11
#     2.12  | 3.12
#     2.13  | 3.13
#     2.14  | 3.14
# (biblatex also has minimum biber requirements). Provided that texlive-biblatex
# package (e.g. 2020) does not RPM-export biblatex's version (e.g. 3.14) and
# biblatex reached 3.14 version many years ago, it does not make sense to keep
# the dependency from biber on texlive-biblatex >= 7:svn42680 here.
# Version at least the main module
Provides:       perl(Biber) = %{version}

# Remove under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Text::BibTeX|Unicode::Collate::Locale)\\)$
%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\(Biber\\)$

%description
Biber is a command-line tool for dealing with bibliographic databases.
Biber offers a large superset of legacy BibTeX (texlive-bibtex)
functionality.  It is often used with the popular BibLaTeX package
(texlive-biblatex), where it is required for some features.


%package tests
Summary:        Tests for %{name}
Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:       coreutils
Requires:       perl-Test-Harness

%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".


%prep
%setup -q -n biber-%{version}
%patch0 -p1
%patch1 -p1
# t/remote-files.t needs the Internet
for F in \
    t/remote-files.t \
%if !%{with biber_enables_extra_test}
    t/full-*.t \
%endif
; do
    rm "$F";
    perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E\b}' MANIFEST
done
# Help generators to recognize Perl scripts
for F in t/*.t; do
    perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
    chmod +x "$F"
done


%build
perl Build.PL installdirs=vendor
./Build

%install
./Build install destdir=%{buildroot} create_packlist=0
%{_fixperms} %{buildroot}/*

# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
mkdir -p %{buildroot}%{_libexecdir}/%{name}/data/schemata
ln -s %{perl_vendorlib}/Biber/biber-tool.conf \
    %{buildroot}%{_libexecdir}/%{name}/data
for F in {bcf,config}.{rnc,rng}; do
    ln -s %{perl_vendorlib}/Biber/"$F" \
        %{buildroot}%{_libexecdir}/%{name}/data/schemata
done
%if %{with biber_enables_extra_test}
mkdir %{buildroot}%{_libexecdir}/%{name}/bin
ln -s %{_bindir}/%{name} %{buildroot}%{_libexecdir}/%{name}/bin
%endif
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/usr/bin/bash
set -e
# t/datalists.t via generate_bltxml_schema() writes into CWD
DIR=$(mktemp -d)
cp -a %{_libexecdir}/%{name}/* "$DIR"
pushd "$DIR"
unset BIBER_DEV_TESTS ISBN_RANGE_MESSAGE PAR_TEMP PERL_LWP_SSL_CA_FILE
%if %{with biber_enables_extra_test}
export BIBER_DEV_TESTS=1
%endif
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
popd
rm -r "$DIR"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test


%check
unset BIBER_DEV_TESTS ISBN_RANGE_MESSAGE PAR_TEMP PERL_LWP_SSL_CA_FILE
%if %{with biber_enables_extra_test}
export BIBER_DEV_TESTS=1
%endif
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
./Build test


%files
%doc README.md Changes TODO.org
%{_bindir}/%{name}
%{_mandir}/man3/*
%{_mandir}/man1/*
%{perl_vendorlib}/Biber*

%files tests
%{_libexecdir}/%{name}


%changelog
* Sat Nov 19 2022 joequant <joequant> 2.18-1.mga9
+ Revision: 1909030
- update to 2.18

* Fri Nov 26 2021 joequant <joequant> 2.16-1.mga9
+ Revision: 1759301
- imported package biber