perl-XML-Structured/perl-XML-Structured.spec
chenyx2012 2df000a788 License compliance rectification
(cherry picked from commit 06d3588772894b0263086a900ccbbde108524887)
2024-06-12 11:32:04 +08:00

89 lines
2.8 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: perl-XML-Structured
Version: 1.3
Release: 4
Summary: Simple conversion API from XML to perl structures and back
License: GPL-1.0-or-later or Artistic-1.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/XML-Structured/
Source0: https://github.com/openSUSE/perl-XML-Structured/archive/refs/heads/master.zip
BuildRequires: findutils make perl-devel perl-interpreter perl-generators perl(ExtUtils::MakeMaker)
BuildRequires: perl(Module::Build::Compat) perl(Test::More) gcc
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
The XML::Structured module provides a way to convert xml data into a
predefined perl data structure and back to xml. Unlike with modules like
XML::Simple it is an error if the xml data does not match the provided
skeleton (the "dtd"). Another advantage is that the order of the attributes
and elements is taken from the dtd when converting back to xml.
%package help
Summary : Simple conversion API from XML to perl structures and back
Provides: perl-XML-Structured-doc
%description help
The XML::Structured module provides a way to convert xml data into a
predefined perl data structure and back to xml. Unlike with modules like
XML::Simple it is an error if the xml data does not match the provided
skeleton (the "dtd"). Another advantage is that the order of the attributes
and elements is taken from the dtd when converting back to xml.
%prep
%setup -q -n perl-XML-Structured-master
%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 .
%clean
rm -rf $RPM_BUILD_ROOT
%files -f filelist.lst
%defattr(-,root,root,-)
%doc README
%files help
%{_mandir}/*
%changelog
* Thu Jul 14 2022 Chenyx <chenyixiong3@huawei.com> - 1.3-4
- License compliance rectification
* Sat Jul 10 2021 wangyue <wangyue92@huawei.com> 1.3-3
- Add gcc to build dependency
* Fri May 21 2021 caodongxia <caodongxia@huawei.com> 1.3-2
- Add perl-devel build require
* Fri May 21 2021 caodongxia <caodongxia@huawei.com> 1.3-1
- Package init