-
Notifications
You must be signed in to change notification settings - Fork 0
/
fcgiwrap.spec
120 lines (97 loc) · 3.89 KB
/
fcgiwrap.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
%global commit 99c942c90063c73734e56bacaa65f947772d9186
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global date 20150530
Name: fcgiwrap
Version: 1.1.0
Release: 6.%{date}git%{shortcommit}%{?dist}
Summary: Simple FastCGI wrapper for CGI scripts
Group: System Environment/Daemons
License: MIT
URL: https://github.com/gnosek/fcgiwrap
Source0: https://github.com/gnosek/fcgiwrap/archive/%{commit}/%{name}-%{commit}.tar.gz
Source1: %{name}@.service
Source2: %{name}@.socket
Source3: fcgiwrap
Source4: SETUP
# https://github.com/gnosek/fcgiwrap/pull/39
Patch0: %{name}-1.1.0-use_pkg-config_libsystemd.patch
# https://github.com/gnosek/fcgiwrap/pull/43
Patch1: %{name}-1.1.0-declare_cgi_error_noreturn.patch
# https://github.com/gnosek/fcgiwrap/pull/44
Patch2: %{name}-1.1.0-fix_kill_param_sequence.patch
BuildRequires: gcc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fcgi-devel
BuildRequires: systemd-devel
%{?systemd_requires}
%description
This package provides a simple FastCGI wrapper for CGI scripts with/
following features:
- very lightweight (84KB of private memory per instance)
- fixes broken CR/LF in headers
- handles environment in a sane way (CGI scripts get HTTP-related environment
vars from FastCGI parameters and inherit all the others from
environment of fcgiwrap )
- no configuration, so you can run several sites off the same
fcgiwrap pool
- passes CGI std error output to std error stream of cgiwrap or FastCGI
- support systemd socket activation, launcher program like spawn-fcgi
is no longer required on systemd-enabled distributions
%prep
%autosetup -n %{name}-%{commit}
install -pm 0644 %{SOURCE4} .
%build
autoreconf -i
%configure --prefix="" --with-systemd
%make_build
%install
%make_install
# Remove the default systemd files
rm -f %{buildroot}%{_unitdir}/fcgiwrap.service
rm -f %{buildroot}%{_unitdir}/fcgiwrap.socket
# Install our own systemd config files
install -Dm 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}@.service
install -Dm 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}@.socket
install -Dm 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%post
%systemd_post %{name}@.service
%systemd_post %{name}@.socket
%preun
%systemd_preun %{name}@.service
%systemd_preun %{name}@.socket
%postun
%systemd_postun_with_restart %{name}@.service
%systemd_postun_with_restart %{name}@.socket
%files
%doc README.rst SETUP
%license COPYING
%{_sbindir}/%{name}
%{_mandir}/man8/%{name}.8*
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}@.socket
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%changelog
* Sat Nov 03 2018 Andrew Bauer <[email protected]> - 1.1.0-6.20150530git99c942c
- Supply our own systemd service, socket, and environment files
- Add Patch2 to fix kill parameter sequence
* Wed Aug 30 2017 Juan Orti Alcaine <[email protected]> - 1.1.0-5.20150530git99c942c
- Add license
- Use systemd_requires macro
- Update URL
- Add Patch1 to fix compilation with gcc 7
* Wed Nov 09 2016 Juan Orti Alcaine <[email protected]> - 1.1.0-4.20150530git99c942c
- Patch0 to rename pkg-config libsystemd-daemon to libsystemd
* Thu Feb 04 2016 Juan Orti Alcaine <[email protected]> - 1.1.0-3.20150530git99c942c
- Use %%make_build macro
* Sat May 30 2015 Juan Orti Alcaine <[email protected]> - 1.1.0-2.20150530git99c942c
- Update to commit 99c942c
* Fri Feb 08 2013 Hiroaki Nakamura <[email protected]> - 1.1.0-1
- new upstream release.
* Fri Jan 11 2013 Hiroaki Nakamura <[email protected]> - 1.0.3.20120908-1
- Change version to increase monotonously.
* Wed Jan 9 2013 Hiroaki Nakamura <[email protected]> - 1.0.3-3.gitb9f03e6377
- Make the rpm relocatable.
* Tue Dec 25 2012 Hiroaki Nakamura <[email protected]> - 1.0.3-2.gitb9f03e6377
* Tue Jan 31 2012 Craig Barnes <[email protected]> - 1.0.3-1.git1328862
- Initial package