!1 Init package
From: @misaka00251 Reviewed-by: @wangyangdahai Signed-off-by: @wangyangdahai
This commit is contained in:
commit
0ddd24af7e
BIN
XML-LibXSLT-2.002000.tar.gz
Normal file
BIN
XML-LibXSLT-2.002000.tar.gz
Normal file
Binary file not shown.
118
perl-XML-LibXSLT.spec
Normal file
118
perl-XML-LibXSLT.spec
Normal file
@ -0,0 +1,118 @@
|
||||
%global cpan_version 2.002000
|
||||
|
||||
Name: perl-XML-LibXSLT
|
||||
Version: 2.002
|
||||
Release: 1
|
||||
Summary: Perl module for interfacing to GNOME's libxslt
|
||||
License: (GPL+ or Artistic) and MIT
|
||||
URL: https://metacpan.org/release/XML-LibXSLT
|
||||
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-%{cpan_version}.tar.gz
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(Cwd)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(vars)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-time
|
||||
BuildRequires: perl(autodie)
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl(DynaLoader)
|
||||
BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(IO::Socket::INET)
|
||||
BuildRequires: perl(XML::LibXML::Boolean)
|
||||
BuildRequires: perl(XML::LibXML::Literal)
|
||||
BuildRequires: perl(XML::LibXML::NodeList)
|
||||
BuildRequires: perl(XML::LibXML::Number)
|
||||
BuildRequires: perl(XML::LibXML) >= %{version}
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(libxslt) >= 1.1.28
|
||||
# Tests
|
||||
BuildRequires: perl(Data::Dumper)
|
||||
BuildRequires: perl(Devel::Peek)
|
||||
BuildRequires: perl(Encode)
|
||||
BuildRequires: perl(IO::Socket::INET)
|
||||
BuildRequires: perl(Test)
|
||||
BuildRequires: perl(Test::More)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(DynaLoader)
|
||||
Requires: perl(Exporter)
|
||||
Requires: perl(XML::LibXML) >= %{version}
|
||||
|
||||
%description
|
||||
This module is a fast XSLT library, based on the Gnome libxslt engine
|
||||
that you can find at http://www.xmlsoft.org/XSLT/
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
License: (GPL+ or Artistic) and MIT
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%{?perl_default_filter}
|
||||
|
||||
%prep
|
||||
%setup -q -n XML-LibXSLT-%{cpan_version}
|
||||
|
||||
# Help generators to recognize Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="%{optflags}" NO_PERLLOCAL=1
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
find %{buildroot} -type f -name '*.bs' -a -size 0 -delete
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t example %{buildroot}%{_libexecdir}/%{name}
|
||||
# Remove release tests
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/cpan-changes.t
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/pod.t
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/style-trailing-space.t
|
||||
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
DIR=$(mktemp -d)
|
||||
pushd "$DIR"
|
||||
cp -a %{_libexecdir}/%{name}/* ./
|
||||
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
popd
|
||||
rm -rf "$DIR"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
|
||||
%check
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
make test
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc Changes README benchmark example
|
||||
%{perl_vendorarch}/auto/*
|
||||
%{perl_vendorarch}/XML
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Jun 30 2022 misaka00251 <misaka00251@misakanet.cn> - 2.002-1
|
||||
- Init package (Thanks to fedora team)
|
||||
Loading…
x
Reference in New Issue
Block a user