]> git.pld-linux.org Git - packages/perl-File-FcntlLock.git/blame - perl-File-FcntlLock.spec
- rebuild with perl 5.18.0
[packages/perl-File-FcntlLock.git] / perl-File-FcntlLock.spec
CommitLineData
91da37eb 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir File
6%define pnam FcntlLock
7%include /usr/lib/rpm/macros.perl
8Summary: File::FcntlLock - File locking with fcntl(2)
9#Summary(pl.UTF-8):
10Name: perl-File-FcntlLock
11Version: 0.14
1ec1c0e9 12Release: 2
91da37eb 13License: unknown
14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/File/%{pdir}-%{pnam}-%{version}.tar.gz
16# Source0-md5: 261aa44a9806181ae8fdf49bead7f828
17# generic URL, check or change before uncommenting
18#URL: http://search.cpan.org/dist/File-FcntlLock/
19BuildRequires: perl-devel >= 1:5.8.0
20BuildRequires: rpm-perlprov >= 4.1-13
21%if %{with tests}
22%endif
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26File locking in Perl is usually done using the flock() function.
27Unfortunately, this only allows locks on whole files and is often
28implemented in terms of flock(2), which has some shortcomings.
29
30Using this module file locking via fcntl(2) can be done (obviously,
31this restricts the use of the module to systems that have a fcntl(2)
32system call). Before a file (or parts of a file) can be locked, an
33object simulating a flock structure must be created and its properties
34set. Afterwards, by calling the lock() method a lock can be set or it
35can be determined if and which process currently holds the lock.
36
37To create a new object representing a flock structure call new():
38
39 $fs = new File::FcntlLock;
40
41You also can pass the new() method a set of key-value pairs to
42initialize the objects properties, e.g. use
43
44# %description -l pl.UTF-8
45# TODO
46
47%prep
48%setup -q -n %{pdir}-%{pnam}-%{version}
49
50%build
51%{__perl} Makefile.PL \
52 INSTALLDIRS=vendor
53%{__make} \
54 CC="%{__cc}" \
55 OPTIMIZE="%{rpmcflags}"
56
57%{?with_tests:%{__make} test}
58
59%install
60rm -rf $RPM_BUILD_ROOT
61
62%{__make} pure_install \
63 DESTDIR=$RPM_BUILD_ROOT
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%files
69%defattr(644,root,root,755)
70%doc Changes README
71%{perl_vendorarch}/File/*.pm
72%dir %{perl_vendorarch}/auto/File/FcntlLock
73%{perl_vendorarch}/auto/File/FcntlLock/*.bs
74%attr(755,root,root) %{perl_vendorarch}/auto/File/FcntlLock/*.so
75%{_mandir}/man3/*
This page took 0.094018 seconds and 4 git commands to generate.