perl-Config-Any/perl-Config-Any.spec
2022-07-15 15:01:00 +08:00

88 lines
2.4 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: perl-Config-Any
Version: 0.32
Release: 1
Summary: Load configuration from different file formats, transparently
License: GPL+ or Artistic-1.0-Perl
Group: Development/Libraries
URL: http://search.cpan.org/dist/Config-Any/
Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Config-Any-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Module::Pluggable::Object) >= 3.6
BuildRequires: perl(Test::More)
Requires: perl(Module::Pluggable::Object) >= 3.6
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Config::Any provides a facility for Perl applications and libraries to
load configuration data from multiple different file formats. It supports
XML, YAML, JSON, Apache-style configuration, Windows INI files, and even
Perl code.
%package help
Summary : Load configuration from different file formats, transparently
Provides: perl-Config-Any-doc
%description help
Config::Any provides a facility for Perl applications and libraries to
load configuration data from multiple different file formats. It supports
XML, YAML, JSON, Apache-style configuration, Windows INI files, and even
Perl code.
%prep
%setup -q -n Config-Any-%{version}
%build
export PERL_MM_OPT=""
%{__perl} Makefile.PL INSTALLDIRS=vendor
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 -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 META.json README
%{perl_vendorlib}/*
%files help
%{_mandir}/*
%changelog
* Fri Jul 15 2022 wangshuo <wangshuo@kylinos.cn> - 0.32-1
- Specfile autogenerated by Perl_Bot