1 %global commit 99c942c90063c73734e56bacaa65f947772d9186
3 Summary: Simple FastCGI wrapper for CGI scripts
8 URL: https://github.com/gnosek/fcgiwrap
9 Source0: https://github.com/gnosek/fcgiwrap/archive/%{commit}/%{name}-%{commit}.tar.gz
10 # Source0-md5: b092e95b676e23407732b4a2fbf800ae
11 Source1: %{name}@.service
12 Source2: %{name}@.socket
13 Source3: %{name}.sysconfig
14 # https://github.com/gnosek/fcgiwrap/pull/39
15 Patch0: %{name}-1.1.0-use_pkg-config_libsystemd.patch
16 # https://github.com/gnosek/fcgiwrap/pull/43
17 Patch1: %{name}-1.1.0-declare_cgi_error_noreturn.patch
18 # https://github.com/gnosek/fcgiwrap/pull/44
19 Patch2: %{name}-1.1.0-fix_kill_param_sequence.patch
20 BuildRequires: autoconf
21 BuildRequires: automake
22 BuildRequires: coreutils
23 BuildRequires: fcgi-devel
25 BuildRequires: systemd-devel
26 Provides: webserver(cgi)
29 This package provides a simple FastCGI wrapper for CGI scripts with/
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
38 - passes CGI std error output to std error stream of cgiwrap or
40 - support systemd socket activation, launcher program like spawn-fcgi
41 is no longer required on systemd-enabled distributions
44 %setup -q -n %{name}-%{commit}
52 CFLAGS="-I%{_includedir}/fastcgi %{rpmcflags}" \
59 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
64 DESTDIR=$RPM_BUILD_ROOT
66 # Remove the default systemd files
67 rm -f $RPM_BUILD_ROOT%{systemdunitdir}/fcgiwrap.service
68 rm -f $RPM_BUILD_ROOT%{systemdunitdir}/fcgiwrap.socket
70 # Install our own systemd config files
71 install -Dm 644 %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.service
72 install -Dm 644 %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.socket
73 install -Dm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
76 %systemd_post %{name}@.service %{name}@.socket
79 %systemd_preun %{name}@.service %{name}@.socket
82 %systemd_postun_with_restart %{name}@.service %{name}@.socket
85 rm -rf $RPM_BUILD_ROOT
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
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}