Skip to content
Snippets Groups Projects
perl-Test-RunValgrind.spec 2.67 KiB
Newer Older
Kiryuu Sakuya's avatar
Kiryuu Sakuya committed
%global _empty_manifest_terminate_build 0

Name:           perl-Test-RunValgrind
Version:        0.2.2
Release:        1
Summary:        Tests that an external program is valgrind-clean
License:        MIT
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Test-RunValgrind/
Source0:        http://mirrors.tuna.tsinghua.edu.cn/CPAN//authors/id/S/SH/SHLOMIF/Test-RunValgrind-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  perl >= 0:5.014
BuildRequires:  perl-generators
BuildRequires:  perl(Carp)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Path::Tiny)
BuildRequires:  perl(strict)
BuildRequires:  perl(Test::More) >= 0.88
BuildRequires:  perl(Test::Trap)
BuildRequires:  perl(warnings)
Requires:       perl(Carp)
Requires:       perl(Path::Tiny)
Requires:       perl(strict)
Requires:       perl(Test::More) >= 0.88
Requires:       perl(Test::Trap)
Requires:       perl(warnings)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Kiryuu Sakuya's avatar
Kiryuu Sakuya committed

Kiryuu Sakuya's avatar
Kiryuu Sakuya committed
%description
valgrind is an open source and convenient memory debugger that runs on some
platforms. This module runs valgrind
(http://en.wikipedia.org/wiki/Valgrind) on an executable and makes sure
that valgrind did not find any faults in it.

%package help
Summary: Tests that an external program is valgrind-clean
Provides: perl-Test-RunValgrind-doc

%description help
valgrind is an open source and convenient memory debugger that runs on some
platforms. This module runs valgrind
(http://en.wikipedia.org/wiki/Valgrind) on an executable and makes sure
that valgrind did not find any faults in it.

%prep
%setup -q -n Test-RunValgrind-%{version}
%build
export PERL_MM_OPT=""
%{__perl} Build.PL --installdirs=vendor
./Build

%install
export PERL_MM_OPT=""
rm -rf $RPM_BUILD_ROOT

./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
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
./Build test

%clean
rm -rf $RPM_BUILD_ROOT

%files -f filelist.lst
%defattr(-,root,root,-)
%doc Changes dist.ini LICENSE META.json README weaver.ini
%{perl_vendorlib}/*
%files help
%{_mandir}/*

%changelog
* Thu Dec 29 2022 Perl_Bot <Perl_Bot@openeuler.org> 0.2.2-1
- Specfile autogenerated by Perl_Bot