]> git.pld-linux.org Git - packages/perl-Server-Starter.git/commitdiff
- added auto/th/perl-Server-Starter-0_11-1
authoraredridel <aredridel@pld-linux.org>
Wed, 11 May 2011 04:59:43 +0000 (04:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    perl-Server-Starter.spec -> 1.1

perl-Server-Starter.spec [new file with mode: 0644]

diff --git a/perl-Server-Starter.spec b/perl-Server-Starter.spec
new file mode 100644 (file)
index 0000000..2b7e84c
--- /dev/null
@@ -0,0 +1,85 @@
+#
+# Conditional build:
+%bcond_without tests           # do not perform "make test"
+#
+%define                pdir    Server
+%define                pnam    Starter
+%include       /usr/lib/rpm/macros.perl
+Summary:       Server::Starter - a superdaemon for hot-deploying server programs
+#Summary(pl.UTF-8):
+Name:          perl-Server-Starter
+Version:       0.11
+Release:       1
+# same as perl
+License:       GPL v1+ or Artistic
+Group:         Development/Languages/Perl
+Source0:       http://www.cpan.org/modules/by-module/Server/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 037d75831a23ca76cd306d678b20332e
+#URL:          http://search.cpan.org/dist/Server-Starter/
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+# generic URL, check or change before uncommenting
+%if %{with tests}
+BuildRequires: perl-List-MoreUtils
+BuildRequires: perl-Proc-Wait3
+BuildRequires: perl-Scope-Guard
+%endif
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+It is often a pain to write a server program that supports graceful
+restarts, with no resource leaks. Server::Starter, solves the problem
+by splitting the task into two. One is start_server, a script provided
+as a part of the module, which works as a superdaemon that binds to
+zero or more TCP ports or unix sockets, and repeatedly spawns the
+server program that actually handles the necessary tasks (for example,
+responding to incoming commenctions). The spawned server programs
+under Server::Starter call accept(2) and handle the requests.
+
+To gracefully restart the server program, send SIGHUP to the
+superdaemon. The superdaemon spawns a new server program, and if (and
+only if) it starts up successfully, sends SIGTERM to the old server
+program.
+
+By using Server::Starter it is much easier to write a hot-deployable
+server. Following are the only requirements a server program to be run
+under Server::Starter should conform to:
+
+- receive file descriptors to listen to through an environment
+  variable
+- perform a graceful shutdown when receiving SIGTERM
+
+A Net::Server personality that can be run under Server::Starter exists
+under the name Net::Server::SS::PreFork.
+
+
+
+# %description -l pl.UTF-8 # TODO
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%attr(755,root,root) %{_bindir}/start_server
+%{_mandir}/man1/start_server.1p*
+%{perl_vendorlib}/Server/*.pm
+%{_mandir}/man3/*
This page took 0.055665 seconds and 4 git commands to generate.