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