perl-Starman/perl-Starman.spec

Name: perl-Starman
Summary: High-performance preforking PSGI web server
Version: 0.3001
Release: 1
License: Artistic/GPL
Group: Applications/CPAN
URL: http://search.cpan.org/dist/Starman/
Description: Starman is a PSGI perl web server that has unique features such as:

High Performance

Preforking

Signals

Superdaemon aware

Multiple interfaces and UNIX Domain Socket support

Small memory footprint

PSGI compatible

HTTP/1.1 support

UNIX only

CentOS 7 x86_64

The build could not start because of the following missing build requirements:

Build Status

CentOS 6 x86_64

The build could not start because of the following missing build requirements:

Build Status

Contents

The spec file used by the build system currently has the following contents:

# $Id$
# Authority: shuff
# Upstream: Tatsuhiko Miyagawa <miyagawa$bulknews,net>
# ExcludeDist: el2 el3 el4

# Plack is RFX on el6 and el5
%{?el6:# Tag: rfx}
%{?el5:# Tag: rfx}

%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)

%define real_name Starman

Summary: High-performance preforking PSGI web server
Name: perl-Starman
Version: 0.3001
Release: 1%{?dist}
License: Artistic/GPL
Group: Applications/CPAN
URL: http://search.cpan.org/dist/Starman/

Source: http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Starman-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch: noarch
BuildRequires: perl >= 5.8.1
BuildRequires: perl(Data::Dump)
BuildRequires: perl(HTTP::Date)
BuildRequires: perl(HTTP::Parser::XS)
BuildRequires: perl(HTTP::Status)
BuildRequires: perl(Net::Server) >= 0.91
BuildRequires: perl(Plack) >= 0.9971
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Requires)
BuildRequires: perl(Test::TCP) >= 1.11
BuildRequires: perl(parent)
BuildRequires: rpm-macros-rpmforge
Requires: perl >= 5.8.1
Requires: perl(Data::Dump)
Requires: perl(HTTP::Date)
Requires: perl(HTTP::Parser::XS)
Requires: perl(HTTP::Status)
Requires: perl(Net::Server) >= 0.91
# Requires: perl(Net::Server::SS::PreFork)
Requires: perl(Plack) >= 0.9971
# Requires: perl(Server::Starter)
Requires: perl(Test::TCP) >= 1.11
Requires: perl(parent)

### remove autoreq Perl dependencies
%filter_from_requires /^perl.*/d
%filter_setup

%description
Starman is a PSGI perl web server that has unique features such as:

High Performance

* Uses the fast XS/C HTTP header parser

Preforking

* Spawns workers preforked like most high performance UNIX servers do. Starman
  also reaps dead children and automatically restarts the worker pool.

Signals

* Supports HUP for graceful restarts, and TTIN/TTOU to dynamically increase or
  decrease the number of worker processes.

Superdaemon aware

* Supports Server::Starter for hot deploy and graceful restarts.

Multiple interfaces and UNIX Domain Socket support

* Able to listen on multiple intefaces including UNIX sockets.

Small memory footprint

* Preloading the applications with --preload-app command line option enables
  copy-on-write friendly memory management. Also, the minimum memory usage
  Starman requires for the master process is 7MB and children (workers) is less
  than 3.0MB.

PSGI compatible

* Can run any PSGI applications and frameworks

HTTP/1.1 support

* Supports chunked requests and responses, keep-alive and pipeline requests.

UNIX only

* This server does not support Win32.


%prep
%setup -n %{real_name}-%{version}

# fix problem with modules generated by older versions of Dist::Zilla
#%{?el5:%{__perl} -pi -e '/.*ExtUtils::MakeMaker.*6\.31.*/ && s/6\.3\d/6.30/' Makefile.PL}

%build
%{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install
#%{__rm} -rf %{buildroot}%{perl_archlib} %{buildroot}%{perl_vendorarch}

# fix for stupid strip issue
#%{__chmod} -R u+w %{buildroot}/*

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc Changes META.yml README
%doc %{_mandir}/man?/*
%{_bindir}/*
%{perl_vendorlib}/HTTP/Server/PSGI/Net/Server/PreFork.pm
%{perl_vendorlib}/Plack/Handler/Starman.pm
%{perl_vendorlib}/Starman.pm
%{perl_vendorlib}/Starman/*
#%exclude %{perl_archlib}/perllocal.pod
%exclude %{perl_vendorarch}/auto/*/.packlist

%changelog
* Thu Aug  2 2012 Steve Huff <shuff@vecna.org> - 0.3001-1
- Updated to version 0.3001.

* Thu Sep  1 2011 Steve Huff <shuff@vecna.org> - 0.2013-1
- Initial package.