Blob Blame History Raw
Name:           perl-File-NFSLock
Version:        1.20
Release:        4%{?dist}
Summary:        Perl module to do NFS (or not) locking

Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/File-NFSLock
Source0:        http://search.cpan.org/CPAN/authors/id/B/BB/BBB/File-NFSLock-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
Program based of concept of hard linking of files being atomic across NFS. 
This concept was mentioned in Mail::Box::Locker (which was originally 
presented in Mail::Folder::Maildir). Some routine flow is taken from 
there -- particularly the idea of creating a random local file, hard 
linking a common file to the local file, and then checking the nlink 
status. Some ideologies were not complete (uncache mechanism, shared 
locking) and some coding was even incorrect (wrong stat index). 
File::NFSLock was written to be light, generic, and fast.

%prep
%setup -q -n File-NFSLock-%{version}


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}


%install
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 d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

chmod a-x examples/lock_test

%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changes README examples/
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*


%changelog
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb  8 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.20-3
- rebuild for new perl

* Mon Oct 15 2007 Tom "spot" Callaway <tcallawa@redhat.com> 1.20-2.1
- correct license tag
- add BR: perl(ExtUtils::MakeMaker)

* Tue Jul 18 2006 Patrice Dumas <pertusus@free.fr> 1.20-2
- add examples/ to %%doc

* Tue Jul 18 2006 Patrice Dumas <pertusus@free.fr> 1.20-1
- Initial packaging