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