1 |
jpp |
1.1 |
%define version 0.1.1 |
2 |
|
|
%define release 1 |
3 |
|
|
%define name smeserver-php-fpm |
4 |
|
|
|
5 |
|
|
|
6 |
|
|
Summary: PHP FPM pools on SME Server |
7 |
|
|
Name: %{name} |
8 |
|
|
Version: %{version} |
9 |
|
|
Release: %{release}%{?dist} |
10 |
|
|
License: MIT |
11 |
|
|
Group: Applications/System |
12 |
|
|
Source: %{name}-%{version}.tar.gz |
13 |
|
|
|
14 |
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
|
|
BuildArch: x86_64 |
16 |
|
|
BuildRequires: e-smith-devtools |
17 |
|
|
|
18 |
|
|
Requires: e-smith-base >= 5.6.0 |
19 |
|
|
|
20 |
|
|
# On el7 we can use mod_proxy_fcgi instead |
21 |
|
|
%if 0%{?rhel} <= 7 |
22 |
|
|
Requires: mod_fastcgi |
23 |
|
|
%endif |
24 |
|
|
|
25 |
|
|
Requires: tmpwatch |
26 |
|
|
Requires: logrotate |
27 |
|
|
|
28 |
|
|
# Stock PHP |
29 |
|
|
Requires: php-cli |
30 |
|
|
Requires: php-ldap |
31 |
|
|
Requires: php-imap |
32 |
|
|
Requires: php-gd |
33 |
|
|
Requires: php-xml |
34 |
|
|
Requires: php-xmlrpc |
35 |
|
|
Requires: php-soap |
36 |
|
|
Requires: php-opcache |
37 |
|
|
Requires: php-fpm |
38 |
|
|
Requires: php-mbstring |
39 |
|
|
Requires: php-mysql |
40 |
|
|
Requires: php-json |
41 |
|
|
Requires: php-bcmath |
42 |
|
|
Requires: php-intl |
43 |
|
|
Requires: php-mcrypt |
44 |
|
|
Requires: php-pear |
45 |
|
|
Requires: php-process |
46 |
|
|
Requires: php-snmp |
47 |
|
|
|
48 |
|
|
# PHP 5.6 |
49 |
|
|
Requires: php56-php-cli |
50 |
|
|
Requires: php56-php-ldap |
51 |
|
|
Requires: php56-php-imap |
52 |
|
|
Requires: php56-php-gd |
53 |
|
|
Requires: php56-php-xml |
54 |
|
|
Requires: php56-php-xmlrpc |
55 |
|
|
Requires: php56-php-soap |
56 |
|
|
Requires: php56-php-opcache |
57 |
|
|
Requires: php56-php-fpm |
58 |
|
|
Requires: php56-php-mbstring |
59 |
|
|
Requires: php56-php-mysql |
60 |
|
|
Requires: php56-php-json |
61 |
|
|
Requires: php56-php-bcmath |
62 |
|
|
Requires: php56-php-intl |
63 |
|
|
Requires: php56-php-mcrypt |
64 |
|
|
Requires: php56-php-pear |
65 |
|
|
Requires: php56-php-process |
66 |
|
|
Requires: php56-php-snmp |
67 |
|
|
|
68 |
|
|
# PHP 7.0 |
69 |
|
|
Requires: php70-php-cli |
70 |
|
|
Requires: php70-php-ldap |
71 |
|
|
Requires: php70-php-imap |
72 |
|
|
Requires: php70-php-gd |
73 |
|
|
Requires: php70-php-xml |
74 |
|
|
Requires: php70-php-xmlrpc |
75 |
|
|
Requires: php70-php-soap |
76 |
|
|
Requires: php70-php-opcache |
77 |
|
|
Requires: php70-php-fpm |
78 |
|
|
Requires: php70-php-mbstring |
79 |
|
|
Requires: php70-php-mysql |
80 |
|
|
Requires: php70-php-json |
81 |
|
|
Requires: php70-php-bcmath |
82 |
|
|
Requires: php70-php-intl |
83 |
|
|
Requires: php70-php-mcrypt |
84 |
|
|
Requires: php70-php-pear |
85 |
|
|
Requires: php70-php-process |
86 |
|
|
Requires: php70-php-snmp |
87 |
|
|
|
88 |
|
|
# PHP 7.1 |
89 |
|
|
Requires: php71-php-cli |
90 |
|
|
Requires: php71-php-ldap |
91 |
|
|
Requires: php71-php-imap |
92 |
|
|
Requires: php71-php-gd |
93 |
|
|
Requires: php71-php-xml |
94 |
|
|
Requires: php71-php-xmlrpc |
95 |
|
|
Requires: php71-php-soap |
96 |
|
|
Requires: php71-php-opcache |
97 |
|
|
Requires: php71-php-fpm |
98 |
|
|
Requires: php71-php-mbstring |
99 |
|
|
Requires: php71-php-mysql |
100 |
|
|
Requires: php71-php-json |
101 |
|
|
Requires: php71-php-bcmath |
102 |
|
|
Requires: php71-php-intl |
103 |
|
|
Requires: php71-php-mcrypt |
104 |
|
|
Requires: php71-php-pear |
105 |
|
|
Requires: php71-php-process |
106 |
|
|
Requires: php71-php-snmp |
107 |
|
|
|
108 |
|
|
%description |
109 |
|
|
Manage PHP FPM pools, and switch between PHP versions easily |
110 |
|
|
|
111 |
|
|
%prep |
112 |
|
|
%setup -q -n %{name}-%{version} |
113 |
|
|
|
114 |
|
|
%build |
115 |
|
|
perl createlinks |
116 |
|
|
%{__mkdir_p} root/var/www/php-cgi-bin/ |
117 |
|
|
%{__mkdir_p} root/var/log/php/php/ |
118 |
|
|
%{__mkdir_p} root/var/lib/php/php/{session,tmp,opcache,wsdlcache} |
119 |
|
|
%{__mkdir_p} root/var/log/php/php56/ |
120 |
|
|
%{__mkdir_p} root/var/lib/php/php56/{session,tmp,opcache,wsdlcache} |
121 |
|
|
%{__mkdir_p} root/var/log/php/php70/ |
122 |
|
|
%{__mkdir_p} root/var/lib/php/php70/{session,tmp,opcache,wsdlcache} |
123 |
|
|
%{__mkdir_p} root/var/log/php/php71/ |
124 |
|
|
%{__mkdir_p} root/var/lib/php/php71/{session,tmp,opcache,wsdlcache} |
125 |
|
|
|
126 |
|
|
%install |
127 |
|
|
/bin/rm -rf $RPM_BUILD_ROOT |
128 |
|
|
(cd root; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
129 |
|
|
/bin/rm -f %{name}-%{version}-filelist |
130 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
131 |
|
|
--dir /var/log/php/php/ 'attr(0770,root,www)' \ |
132 |
|
|
--dir /var/lib/php/php/session 'attr(0770,root,www)' \ |
133 |
|
|
--dir /var/lib/php/php/tmp 'attr(0770,root,www)' \ |
134 |
|
|
--dir /var/lib/php/php/opcache 'attr(0770,root,www)' \ |
135 |
|
|
--dir /var/lib/php/php/wsdlcache 'attr(0770,root,www)' \ |
136 |
|
|
--dir /var/log/php/php56/ 'attr(0770,root,www)' \ |
137 |
|
|
--dir /var/lib/php/php56/session 'attr(0770,root,www)' \ |
138 |
|
|
--dir /var/lib/php/php56/tmp 'attr(0770,root,www)' \ |
139 |
|
|
--dir /var/lib/php/php56/opcache 'attr(0770,root,www)' \ |
140 |
|
|
--dir /var/lib/php/php56/wsdlcache 'attr(0770,root,www)' \ |
141 |
|
|
--dir /var/log/php/php70/ 'attr(0770,root,www)' \ |
142 |
|
|
--dir /var/lib/php/php70/session 'attr(0770,root,www)' \ |
143 |
|
|
--dir /var/lib/php/php70/tmp 'attr(0770,root,www)' \ |
144 |
|
|
--dir /var/lib/php/php70/opcache 'attr(0770,root,www)' \ |
145 |
|
|
--dir /var/lib/php/php70/wsdlcache 'attr(0770,root,www)' \ |
146 |
|
|
--dir /var/log/php/php71/ 'attr(0770,root,www)' \ |
147 |
|
|
--dir /var/lib/php/php71/session 'attr(0770,root,www)' \ |
148 |
|
|
--dir /var/lib/php/php71/tmp 'attr(0770,root,www)' \ |
149 |
|
|
--dir /var/lib/php/php71/opcache 'attr(0770,root,www)' \ |
150 |
|
|
--dir /var/lib/php/php71/wsdlcache 'attr(0770,root,www)' \ |
151 |
|
|
> %{name}-%{version}-filelist |
152 |
|
|
|
153 |
|
|
%clean |
154 |
|
|
rm -rf $RPM_BUILD_ROOT |
155 |
|
|
|
156 |
|
|
%files -f %{name}-%{version}-filelist |
157 |
|
|
%defattr(-,root,root) |
158 |
|
|
|
159 |
|
|
%pre |
160 |
|
|
|
161 |
|
|
%post |
162 |
|
|
|
163 |
|
|
%preun |
164 |
|
|
|
165 |
|
|
%changelog |
166 |
|
|
* Thu Jul 27 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1.sme |
167 |
|
|
- Fix closing parenthesis on prop method in httpd template |
168 |
|
|
|
169 |
|
|
* Wed Jul 26 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-1.sme |
170 |
|
|
- Initial release |