!6 【轻量级 PR】:define mod_name to opitomize the specfile

From: @huyubiao 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
This commit is contained in:
openeuler-ci-bot 2022-10-25 06:12:22 +00:00 committed by Gitee
commit d58386ae93
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,10 +1,11 @@
Name: perl-Thread-Queue %define mod_name Thread-Queue
Name: perl-%{mod_name}
Version: 3.13 Version: 3.13
Release: 3 Release: 4
Summary: Thread-safe queues Summary: Thread-safe queues
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/Thread-Queue URL: https://metacpan.org/release/%{mod_name}
Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/Thread-Queue-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/%{mod_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: make sed perl-generators perl-interpreter BuildRequires: make sed perl-generators perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 perl(Test::More) >= 0.50 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 perl(Test::More) >= 0.50
@ -36,7 +37,7 @@ requires: man
The %{name}-help package contains doc files for %{name}. The %{name}-help package contains doc files for %{name}.
%prep %prep
%autosetup -n Thread-Queue-%{version} %autosetup -n %{mod_name}-%{version}
sed -i -e '1 s|^#!/usr/bin/env perl|%(perl -MConfig -e 'print $Config{startperl}')|' examples/queue.pl sed -i -e '1 s|^#!/usr/bin/env perl|%(perl -MConfig -e 'print $Config{startperl}')|' examples/queue.pl
%build %build
@ -59,6 +60,9 @@ make test
%{_mandir}/man3/* %{_mandir}/man3/*
%changelog %changelog
* Tue Oct 25 2022 huyubiao <huyubiao@huawei.com> - 3.13-4
- define mod_name to opitomize the specfile
* Fri Sep 27 2019 luhuaxin <luhuaxin@huawei.com> - 3.13-3 * Fri Sep 27 2019 luhuaxin <luhuaxin@huawei.com> - 3.13-3
- Type: enhancement - Type: enhancement
- ID: NA - ID: NA