]>
Commit | Line | Data |
---|---|---|
da38a07e MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
10b27067 | 4 | |
da38a07e MP |
5 | %define pdir POE |
6 | %define pnam Component-Daemon | |
10b27067 | 7 | %include /usr/lib/rpm/macros.perl |
ad7f689e | 8 | Summary: POE::Component::Daemon - Handles all the housework for a daemon |
da38a07e | 9 | Name: perl-POE-Component-Daemon |
ad7f689e | 10 | Version: 0.1300 |
da38a07e MP |
11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/POE/%{pdir}-%{pnam}-%{version}.tar.gz | |
ad7f689e | 16 | # Source0-md5: ceb684aa01237ce2eb884fdbf81b8370 |
10b27067 | 17 | URL: http://search.cpan.org/dist/POE-Component-Daemon/ |
da38a07e MP |
18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl(POE::API::Peek) >= 1 | |
22 | BuildRequires: perl-POE >= 0.3202 | |
23 | %endif | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
ad7f689e | 28 | Dealing with all the little details of a forking daemon can be |
29 | annoying and hard. POE::Component::Daemon encapsulates all the details | |
30 | into one place and (hopefully) gets them right. | |
da38a07e | 31 | |
ad7f689e | 32 | POE::Component::Daemon will deal with all the annoying details of |
33 | creating and maintaining daemon processes. It can detach from the | |
34 | console, handle pre-forking pools or post-forking (ie, fork on each | |
35 | request). It will also redirect STDERR to a log file if asked. | |
da38a07e MP |
36 | |
37 | POE::Component::Daemon also babysits child processes, handling their | |
ad7f689e | 38 | CHLD. POE::Component::Daemon can also makes sure requests don't take |
39 | to long. If they do, it will try to get rid of them. See /BABYSITING | |
da38a07e MP |
40 | below. |
41 | ||
ad7f689e | 42 | POE::Component::Daemon does not handle listening on sockets. That is |
43 | up to your code. | |
da38a07e | 44 | |
ad7f689e | 45 | Like all of POE, POE::Component::Daemon works cooperatively. It is up |
46 | your code to tell POE::Component::Daemon when it is time to fork, | |
47 | block incoming requests when approriate and so on. | |
da38a07e | 48 | |
da38a07e MP |
49 | %prep |
50 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
51 | ||
52 | %build | |
53 | %{__perl} Makefile.PL \ | |
54 | INSTALLDIRS=vendor | |
55 | %{__make} | |
56 | ||
57 | %{?with_tests:%{__make} test} | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %{__make} pure_install \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc Changes README | |
71 | %{perl_vendorlib}/POE/Component/*.pm | |
72 | %{perl_vendorlib}/POE/Component/Daemon | |
73 | %{_mandir}/man3/* |