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