perl-Ref-Util-XS/perl-Ref-Util-XS.spec
2023-04-28 11:39:37 +08:00

97 lines
2.6 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: perl-Ref-Util-XS
Version: 0.117
Release: 2
Summary: XS implementation for Ref::Util
License: MIT
Group: Development/Libraries
URL: http://search.cpan.org/dist/Ref-Util-XS/
Source0: http://www.cpan.org/authors/id/X/XS/XSAWYERX/Ref-Util-XS-%{version}.tar.gz
BuildRequires: perl >= 0:5.006
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(B::Concise)
BuildRequires: perl(Exporter) >= 5.57
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec)
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(XSLoader)
Requires: perl(Exporter) >= 5.57
Requires: perl(XSLoader)
%description
Ref::Util::XS is the XS implementation of Ref::Util, which provides several
functions to help identify references in a more convenient way than the
usual approach of examining the return value of ref.
%package help
Summary: XS implementation for Ref::Util
Provides: perl-Ref-Util-XS-doc
%description help
Ref::Util::XS is the XS implementation of Ref::Util, which provides several
functions to help identify references in a more convenient way than the
usual approach of examining the return value of ref.
%prep
%setup -q -n Ref-Util-XS-%{version}
%build
export PERL_MM_OPT=""
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
make %{?_smp_mflags}
%install
export PERL_MM_OPT=""
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
pushd %{buildroot}
touch filelist.lst
if [ -d usr/bin ];then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ];then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ];then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib ];then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
popd
mv %{buildroot}/filelist.lst .
%check || :
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files -f filelist.lst
%defattr(-,root,root,-)
%doc Changes cpanfile dist.ini LICENSE META.json README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Ref*
%files help
%{_mandir}/*
%changelog
* Fri Apr 28 2023 misaka00251 <liuxin@iscas.ac.cn> - 0.117-2
- Fix EXTERN.h: No such file or directory
* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> - 0.117-1
- Specfile autogenerated by Perl_Bot