]>
Commit | Line | Data |
---|---|---|
5cc03d7d | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
6a1d9b79 | 4 | |
5cc03d7d | 5 | %define pdir File |
6 | %define pnam NFSLock | |
a20f9258 | 7 | Summary: File::NFSLock - Perl module to do NFS (or not) locking |
1e25d3be | 8 | Summary(pl.UTF-8): File::NFSLock - moduł Perla do zakładania (lub nie) blokad na NFS-ie |
5cc03d7d | 9 | Name: perl-File-NFSLock |
e20e7bf6 | 10 | Version: 1.21 |
11 | Release: 1 | |
5cc03d7d | 12 | License: Artistic |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
e20e7bf6 | 15 | # Source0-md5: 8067802ce7247d0697d6203e26cb7bd7 |
6a1d9b79 | 16 | URL: http://search.cpan.org/dist/File-NFSLock/ |
5cc03d7d | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
23 | Program based of concept of hard linking of files being atomic across | |
a20f9258 | 24 | NFS. This concept was mentioned in Mail::Box::Locker (which was |
25 | originally presented in Mail::Folder::Maildir). Some routine flow is | |
26 | taken from there - particularly the idea of creating a random local | |
5cc03d7d | 27 | file, hard linking a common file to the local file, and then checking |
a20f9258 | 28 | the nlink status. Some ideologies were not complete (uncache |
5cc03d7d | 29 | mechanism, shared locking) and some coding was even incorrect (wrong |
a20f9258 | 30 | stat index). File::NFSLock was written to be light, generic, and fast. |
5cc03d7d | 31 | |
29a264c2 JR |
32 | %description -l pl.UTF-8 |
33 | Program oparty jest na idei twardych dowiązań plików, będących | |
34 | atomowymi po NFS-ie. Idea ta była wspomniana w Mail::Box::Locker | |
35 | (oryginalnie zaprezentowanym w Mail::Folder::Maildir). Część kodu jest | |
36 | wzięta stamtąd - w szczególności pomysł tworzenia losowego pliku | |
37 | lokalnie, tworzenia twardego dowiązania wspólnego pliku do pliku | |
38 | lokalnego i następnie sprawdzania stanu liczby dowiązań. Niektóre | |
39 | pomysły nie były kompletne (mechanizm uncache, blokowanie | |
40 | współdzielone), a niektóre były zakodowane niepoprawnie (zły indeks | |
41 | stat). File::NFSLock został napisany by być lekkim, ogólnym i szybkim. | |
5cc03d7d | 42 | |
43 | %prep | |
44 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
45 | ||
46 | %build | |
47 | %{__perl} Makefile.PL \ | |
48 | INSTALLDIRS=vendor | |
49 | %{__make} | |
50 | ||
51 | %{?with_tests:%{__make} test} | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %{__make} install \ | |
57 | DESTDIR=$RPM_BUILD_ROOT | |
58 | ||
59 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc Changes | |
68 | %{perl_vendorlib}/File/*.pm | |
69 | %{_mandir}/man3/* | |
70 | %{_examplesdir}/%{name}-%{version} |