92 lines
2.8 KiB
RPMSpec
92 lines
2.8 KiB
RPMSpec
%global _empty_manifest_terminate_build 0
|
|
Name: perl-File-FcntlLock
|
|
Version: 0.22
|
|
Release: 1
|
|
Summary: File locking with fcntl(2)
|
|
License: GPL+ or Artistic
|
|
Group: Development/Libraries
|
|
URL: http://search.cpan.org/dist/File-FcntlLock/
|
|
Source0: http://www.cpan.org/authors/id/J/JT/JTT/File-FcntlLock-%{version}.tar.gz
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl(Carp)
|
|
BuildRequires: perl(Config)
|
|
BuildRequires: perl(DynaLoader)
|
|
BuildRequires: perl(Errno)
|
|
BuildRequires: perl(Exporter)
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
BuildRequires: perl(POSIX)
|
|
Requires: perl(Carp)
|
|
Requires: perl(Config)
|
|
Requires: perl(DynaLoader)
|
|
Requires: perl(Errno)
|
|
Requires: perl(Exporter)
|
|
Requires: perl(POSIX)
|
|
%description
|
|
File locking in Perl is usually done using the flock function.
|
|
Unfortunately, this only allows locks on whole files and is often
|
|
implemented in terms of the flock(2) system function which has some
|
|
shortcomings (especially concerning locks on remotely mounted file systems)
|
|
and slightly different behaviour than fcntl(2).
|
|
%package help
|
|
Summary : File locking with fcntl(2)
|
|
Provides: perl-File-FcntlLock-doc
|
|
%description help
|
|
File locking in Perl is usually done using the flock function.
|
|
Unfortunately, this only allows locks on whole files and is often
|
|
implemented in terms of the flock(2) system function which has some
|
|
shortcomings (especially concerning locks on remotely mounted file systems)
|
|
and slightly different behaviour than fcntl(2).
|
|
%prep
|
|
%setup -q -n File-FcntlLock-%{version}
|
|
%build
|
|
export PERL_MM_OPT=""
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
|
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
|
|
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 -type f -name '*.bs' -size 0 -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 README
|
|
%{perl_vendorarch}/auto/*
|
|
%{perl_vendorarch}/File*
|
|
%files help
|
|
%{_mandir}/*
|
|
|
|
%changelog
|
|
* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 0.22-1
|
|
- Specfile autogenerated by Perl_Bot
|