]> git.pld-linux.org Git - packages/perl-Server-Starter.git/blame - perl-Server-Starter.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Server-Starter.git] / perl-Server-Starter.spec
CommitLineData
b53d342f 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
aa62a755 4
b53d342f 5%define pdir Server
6%define pnam Starter
b53d342f 7Summary: Server::Starter - a superdaemon for hot-deploying server programs
b53d342f 8Name: perl-Server-Starter
b8f3d75c 9Version: 0.35
b53d342f 10Release: 1
11# same as perl
12License: GPL v1+ or Artistic
13Group: Development/Languages/Perl
14Source0: http://www.cpan.org/modules/by-module/Server/%{pdir}-%{pnam}-%{version}.tar.gz
b8f3d75c 15# Source0-md5: 10cc818382ff22b27d9af37344fbff18
aa62a755 16URL: http://search.cpan.org/dist/Server-Starter/
b53d342f 17BuildRequires: perl-devel >= 1:5.8.0
18BuildRequires: rpm-perlprov >= 4.1-13
b53d342f 19%if %{with tests}
20BuildRequires: perl-List-MoreUtils
21BuildRequires: perl-Proc-Wait3
22BuildRequires: perl-Scope-Guard
23%endif
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28It is often a pain to write a server program that supports graceful
29restarts, with no resource leaks. Server::Starter, solves the problem
30by splitting the task into two. One is start_server, a script provided
31as a part of the module, which works as a superdaemon that binds to
32zero or more TCP ports or unix sockets, and repeatedly spawns the
33server program that actually handles the necessary tasks (for example,
34responding to incoming commenctions). The spawned server programs
35under Server::Starter call accept(2) and handle the requests.
36
37To gracefully restart the server program, send SIGHUP to the
38superdaemon. The superdaemon spawns a new server program, and if (and
39only if) it starts up successfully, sends SIGTERM to the old server
40program.
41
42By using Server::Starter it is much easier to write a hot-deployable
43server. Following are the only requirements a server program to be run
44under Server::Starter should conform to:
45
46- receive file descriptors to listen to through an environment
47 variable
48- perform a graceful shutdown when receiving SIGTERM
49
50A Net::Server personality that can be run under Server::Starter exists
51under the name Net::Server::SS::PreFork.
52
b53d342f 53%prep
54%setup -q -n %{pdir}-%{pnam}-%{version}
55
56%build
b8f3d75c
AM
57%{__perl} Build.PL \
58 --destdir=$RPM_BUILD_ROOT \
59 --installdirs=vendor
60./Build
b53d342f 61
b8f3d75c 62%{?with_tests:./Build test}
b53d342f 63
64%install
65rm -rf $RPM_BUILD_ROOT
66
b8f3d75c 67./Build install
b53d342f 68
69%clean
70rm -rf $RPM_BUILD_ROOT
71
72%files
73%defattr(644,root,root,755)
b8f3d75c 74%doc Changes README.md
b53d342f 75%attr(755,root,root) %{_bindir}/start_server
76%{_mandir}/man1/start_server.1p*
b8f3d75c
AM
77%dir %{perl_vendorlib}/Server/Starter
78%{perl_vendorlib}/Server/Starter/Guard.pm
b53d342f 79%{perl_vendorlib}/Server/*.pm
80%{_mandir}/man3/*
This page took 0.372787 seconds and 4 git commands to generate.