source: projects/specs/trunk/f/fcgiwrap/fcgiwrap-vl.spec @ 12364

Revision 12364, 4.6 KB checked in by tomop, 4 years ago (diff)

updated 13 packages

acpid-2.0.32-1

at-3.1.23-1

autofs-5.1.6-1

dracut-050-3

fcgi-2.4.2-1

fcgiwrap-1.1.0.git20200404-2

firefox-68.6.1-1

initscripts-8.91.16-3

iptables-1.8.4-2

lxc-4.0.0-1

libnftnl-1.1.6-1

smp_utils-0.99-1

util-linux-2.35.1-1

Line 
1%bcond_with systemd
2
3%global orig_version 1.1.0
4%global git_date     20200404
5
6Summary:        A simple FastCGI server for CGI applications.
7Summary(ja):    CGIアプリケーションを動作させるためのシンプルなFastCGIサーバ
8Name:           fcgiwrap
9Version:        %{orig_version}.git%{git_date}
10Release:        2%{?_dist_release}%{?with_systemd:.systemd}
11Group:          System Environment/Daemons
12Vendor:         Project Vine
13Distribution:   Vine Linux
14License:        GPL+
15URL:            https://github.com/gnosek/fcgiwrap
16Source0:        %{name}-%{orig_version}.tar.gz
17Source1:        fcgiwrap_params
18Source2:        fcgiwrap.init
19Source3:        fcgiwrap.sysconfig
20Source4:        %{name}@.service
21Source5:        %{name}@.socket
22Source6:        fcgiwrap.sysconfig.systemd
23Patch0:         fcgiwrap-HEAD.patch
24# https://github.com/gnosek/fcgiwrap/pull/39
25Patch1:         %{name}-1.1.0-use_pkg-config_libsystemd.patch
26# https://github.com/gnosek/fcgiwrap/pull/43
27Patch2:         %{name}-1.1.0-declare_cgi_error_noreturn.patch
28# https://github.com/gnosek/fcgiwrap/pull/44
29Patch3:         %{name}-1.1.0-fix_kill_param_sequence.patch
30
31BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
32BuildRequires: fcgi-devel
33%if %{with systemd}
34BuildRequires:  systemd-devel
35%{?systemd_requires}
36%else
37Requires: spawn-fcgi
38Requires(post): /sbin/chkconfig
39Requires(preun): /sbin/chkconfig
40Requires(preun): /sbin/service
41%endif
42
43%description
44 fcgiwrap is a simple server for running CGI applications over FastCGI.
45It hopes to provide clean CGI support to Nginx (and other web servers
46that may need it).
47
48%description -l ja
49  fcgiwrapは、Nginx等のCGIをサポートしていないWebサーバ上でCGIアプリケー
50ションを動作させるための、シンプルなFastCGIサーバです。
51
52%package nginx
53Summary: A Nginx configuration file to use fcgiwrap
54Group: System Environment/Daemons
55Requires: %{name} = %{version}-%{release}
56Requires: nginx
57
58%description nginx
59 This package contains a Nginx configuration file to use fcgiwrap.
60
61
62%prep
63%setup -q -n fcgiwrap-%{orig_version}
64%patch0 -p1
65%if %{with systemd}
66%patch1 -p1
67%endif
68%patch2 -p1
69%patch3 -p1
70
71autoreconf -i
72
73%build
74%if %{with systemd}
75%configure --prefix="" --with-systemd
76%else
77%configure
78%endif
79
80make
81
82%install
83rm -rf %{buildroot}
84make DESTDIR=%{buildroot} install
85
86if [ -d %{buildroot}%{_prefix}%{_prefix} ]; then
87  mv %{buildroot}%{_prefix}%{_prefix}/* %{buildroot}%{_prefix}/
88fi
89mkdir -p %{buildroot}%{_sysconfdir}/{nginx,sysconfig}
90mkdir -p %{buildroot}%{_initdir}/
91install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nginx/
92
93%if %{with systemd}
94# Remove the default systemd files
95rm -f %{buildroot}%{_unitdir}/fcgiwrap.service
96rm -f %{buildroot}%{_unitdir}/fcgiwrap.socket
97
98# Install our own systemd config files
99install -Dm 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}@.service
100install -Dm 644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}@.socket
101install -m644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/fcgiwrap
102%else
103install -m755 %{SOURCE2} %{buildroot}%{_initdir}/fcgiwrap
104install -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/fcgiwrap
105%endif
106
107%clean
108rm -rf %{buildroot}
109
110%post
111%if %{with systemd}
112%systemd_post %{name}@.service
113%systemd_post %{name}@.socket
114%else
115/sbin/chkconfig --add fcgiwrap
116%endif
117
118%preun
119%if %{with systemd}
120%systemd_preun %{name}@.service
121%systemd_preun %{name}@.socket
122%else
123if [ $1 -eq 0 ]; then
124  /sbin/service fcgiwrap stop > /dev/null 2>&1
125  /sbin/chkconfig --del fcgiwrap
126fi
127%endif
128
129%postun
130%if %{with systemd}
131%systemd_postun_with_restart %{name}@.service
132%systemd_postun_with_restart %{name}@.socket
133%else
134if [ $1 -ge 1 ]; then
135  /sbin/service fcgiwrap condrestart 2>&1 >/dev/null
136fi
137%endif
138
139%files
140%defattr(-,root,root)
141%license COPYING
142%doc README.rst
143%{_sbindir}/fcgiwrap
144%{_mandir}/man8/fcgiwrap.8*
145%config(noreplace) %{_sysconfdir}/sysconfig/fcgiwrap
146%if %{with systemd}
147%{_unitdir}/%{name}@.service
148%{_unitdir}/%{name}@.socket
149%else
150%attr(0755,root,root) %{_initdir}/fcgiwrap
151%endif
152
153%files nginx
154%defattr(-,root,root)
155%config(noreplace) %{_sysconfdir}/nginx/fcgiwrap_params
156
157%changelog
158* Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.0.git20200404-2
159- fixed %%changelog.
160
161* Sat Apr 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.0.git20200404-1
162- updated to git HEAD.
163- added systemd stuff (disabled as default).
164
165* Sun Jan 12 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.0-1
166- new upstream release.
167
168* Fri Apr 27 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.3-2
169- fixed configurations.
170
171* Thu May 19 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.3-1
172- initial built.
173
Note: See TracBrowser for help on using the repository browser.