]> git.pld-linux.org Git - packages/fcgiwrap.git/blame - fcgiwrap.spec
Rel 1; works for me (with nginx + systemd)
[packages/fcgiwrap.git] / fcgiwrap.spec
CommitLineData
99e77ebd
AM
1%global commit 99c942c90063c73734e56bacaa65f947772d9186
2
3Summary: Simple FastCGI wrapper for CGI scripts
4Name: fcgiwrap
5Version: 1.1.0
0dd4359f 6Release: 1
99e77ebd
AM
7License: MIT
8URL: https://github.com/gnosek/fcgiwrap
9Source0: https://github.com/gnosek/fcgiwrap/archive/%{commit}/%{name}-%{commit}.tar.gz
10# Source0-md5: b092e95b676e23407732b4a2fbf800ae
11Source1: %{name}@.service
12Source2: %{name}@.socket
13Source3: %{name}.sysconfig
14# https://github.com/gnosek/fcgiwrap/pull/39
15Patch0: %{name}-1.1.0-use_pkg-config_libsystemd.patch
16# https://github.com/gnosek/fcgiwrap/pull/43
17Patch1: %{name}-1.1.0-declare_cgi_error_noreturn.patch
18# https://github.com/gnosek/fcgiwrap/pull/44
19Patch2: %{name}-1.1.0-fix_kill_param_sequence.patch
20BuildRequires: autoconf
21BuildRequires: automake
22BuildRequires: coreutils
23BuildRequires: fcgi-devel
24BuildRequires: gcc
25BuildRequires: systemd-devel
0dd4359f 26Provides: webserver(cgi)
99e77ebd
AM
27
28%description
29This package provides a simple FastCGI wrapper for CGI scripts with/
30following features:
31 - very lightweight (84KB of private memory per instance)
32 - fixes broken CR/LF in headers
33 - handles environment in a sane way (CGI scripts get HTTP-related
34 environment vars from FastCGI parameters and inherit all the others
35 from environment of fcgiwrap )
36 - no configuration, so you can run several sites off the same fcgiwrap
37 pool
38 - passes CGI std error output to std error stream of cgiwrap or
39 FastCGI
40 - support systemd socket activation, launcher program like spawn-fcgi
41 is no longer required on systemd-enabled distributions
42
43%prep
44%setup -q -n %{name}-%{commit}
45%patch0 -p1
46%patch1 -p1
47%patch2 -p1
48
49%build
50autoreconf -i
51%configure \
52 CFLAGS="-I%{_includedir}/fastcgi %{rpmcflags}" \
53 --prefix="" \
54 --with-systemd
55
56%{__make}
57
58%install
59rm -rf $RPM_BUILD_ROOT
60
61install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
62
63%{__make} install \
64 DESTDIR=$RPM_BUILD_ROOT
65
66# Remove the default systemd files
67rm -f $RPM_BUILD_ROOT%{systemdunitdir}/fcgiwrap.service
68rm -f $RPM_BUILD_ROOT%{systemdunitdir}/fcgiwrap.socket
69
70# Install our own systemd config files
71install -Dm 644 %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.service
72install -Dm 644 %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.socket
73install -Dm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
74
75%post
76%systemd_post %{name}@.service %{name}@.socket
77
78%preun
79%systemd_preun %{name}@.service %{name}@.socket
80
81%postun
82%systemd_postun_with_restart %{name}@.service %{name}@.socket
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
87%files
88%defattr(644,root,root,755)
89%doc README.rst COPYING
90%attr(755,root,root) %{_sbindir}/%{name}
91%{_mandir}/man8/%{name}.8*
92%{systemdunitdir}/%{name}@.service
93%{systemdunitdir}/%{name}@.socket
0dd4359f 94%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.077067 seconds and 4 git commands to generate.