define mod_name to opitomize the specfile

This commit is contained in:
wangyuhang27 2022-10-26 17:12:50 +08:00
parent e6ab239691
commit 56f3e67f2f

View File

@ -1,11 +1,13 @@
Name: perl-XML-Parser %define mod_name XML-Parser
Name: perl-%{mod_name}
Epoch: 1 Epoch: 1
Version: 2.46 Version: 2.46
Release: 1 Release: 2
Summary: Perl module for parsing XML documents Summary: Perl module for parsing XML documents
License: GPLv1+ or Artistic 1.0 License: GPLv1+ or Artistic 1.0
URL: https://metacpan.org/release/XML-Parser URL: https://metacpan.org/release/%{mod_name}
Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/%{mod_name}-%{version}.tar.gz
BuildRequires: gcc make perl-generators perl expat-devel perl-devel BuildRequires: gcc make perl-generators perl expat-devel perl-devel
Requires: perl Requires: perl
@ -29,7 +31,7 @@ BuildArch: noarch
%{summary}. %{summary}.
%prep %prep
%autosetup -n XML-Parser-%{version} %autosetup -n %{mod_name}-%{version}
%build %build
perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
@ -52,8 +54,11 @@ make test
%{_mandir}/man3/*.3* %{_mandir}/man3/*.3*
%changelog %changelog
* Wed Oct 26 2022 wangyuhang <wangyuhang27@huawei.com> - 1:2.46-2
- define mod_name to opitomize the specfile
* Wed Jul 22 2020 dingyue <dingyue5@huawei.com> - 1:2.46-1 * Wed Jul 22 2020 dingyue <dingyue5@huawei.com> - 1:2.46-1
- - update to 2.46
* Wed May 13 2020 licunlong <licunlong1@huawei.com> - 1:2.44-4 * Wed May 13 2020 licunlong <licunlong1@huawei.com> - 1:2.44-4
- add perl-devel buildrequire - add perl-devel buildrequire