Changes of Revision 36
[-] | Changed | php5-pecl_http.spec |
x 1
2 %define php_version %(php-config --version 2>/dev/null) 3 %if "%{pkg_version}" == "5.6" 4 %define my_version 2.4.3 5 +%define upstream 1 6 BuildRequires: libevent-devel 7 BuildRequires: php5-raphf 8 BuildRequires: php5-propro 9 +Requires: php5-raphf 10 +Requires: php5-propro 11 %else 12 %define my_version 1.7.6 13 +%define upstream 0 14 %endif 15 # 16 Name: php5-pecl_http 17
18 # 19 URL: http://pecl.php.net/pecl_http 20 Source: http://pecl.php.net/package/pecl_http/%{pkg_name}-%{my_version}.tar.bz2 21 +%if "%{upstream}" == "0" 22 Source1: http.ini 23 +%else 24 +Source1: http-2.4.3.ini 25 +%endif 26 Patch0: pecl_http-2.4.3_debug.patch 27 Summary: Extended HTTP Support 28 29
30 31 %prep 32 %setup -q -n %{pkg_name}-%{my_version} 33 -%if "%{my_version}" == "2.4.3" 34 +%if "%{upstream}" == "1" 35 %patch0 36 %endif 37 38
39 --with-http-magic-mime=%{_usr} \ 40 --with-http-zlib-compression=%{_usr} \ 41 --with-http-curl-requests=%{_usr} \ 42 -%if "%{my_version}" == "2.4.3" 43 +%if "%{upstream}" == "1" 44 --without-http-shared-deps \ 45 %else 46 --with-http-shared-deps \ 47
48 %{__install} -m 644 %{S:1} %{buildroot}%{_sysconfdir}/php5/conf.d/http.ini 49 50 %clean 51 - 52 %{__rm} -rf %{buildroot} 53 54 +%post 55 +for file in /etc/php5/conf.d/propro.ini /etc/php5/conf.d/raphf.ini ; do 56 + if [ -f ${file} ] ; then 57 + sed -i -e s@"^(extension\s?=.*)"@";\1"@ ${file} 58 + fi 59 +done 60 + 61 %files 62 %defattr(-,root,root,-) 63 %{_libdir}/php5/extensions/http.so 64
65 %files devel 66 %defattr(-,root,root,-) 67 %dir %{_includedir}/php5/ext/http 68 -%if "%{my_version}" != "2.4.3" 69 +%if "%{upstream}" == "0" 70 %dir %{_includedir}/php5/ext/http/phpstr 71 %{_includedir}/php5/ext/http/*.h 72 %{_includedir}/php5/ext/http/phpstr/*.h 73 |
||
[+] | Added | http-2.4.3.ini ^ |
@@ -0,0 +1,66 @@ +; example INI file for pecl/http +; $Id: http.ini,v 1.11 2007/02/09 14:19:40 mike Exp $ + +[http] + +extension = raphf.so +extension = propro.so +extension = http.so + +; enable if you want to transform all errors to exceptions (PHP >= 5 only) +;http.only_exceptions = 1 + +; disable if you don't want php to exit in case of redirects and cache hits; +; a "NULL" output handler will be started instead, which discards all output +;http.force_exit = 0 + +; disable if you don't want 404 Not found status messages being sent, +; if a file attempted to be sent with http_send_file() etc. cannot be found +;http.send.not_found_404 = 0 + +; the hashing algorithm with wich ETags are generated (MD5, SHA1, CRC32B); +; if ext/hash is available, this can be set to any hash algorithm ext/hash supports +; MD5 is the default and fallback algorithm +;http.etag.mode = "MD5" + +; allowed request methods +; by default PHP ignores unkown request methods +; PHP will exit with a response status of 405 and an Allow header +; if it encounters a request method not contained in the specified list +;http.request.methods.allowed = "HEAD, GET, POST" + +; custom request methods +;http.request.methods.custom = "KICK, BANN" + +; log file for positive cache hits +;http.log.cache = + +; log file for redirects +;http.log.redirect = + +; log file for responses with http_send_file() etc. where the file's not been found +;http.log.not_found = + +; log file for requests with an unallowed request method +;http.log.allowed_methods = + +; composite log file (i.e. log all messages to this file) +;http.log.composite = + +; automatically deflate content if requested/supported by client +;http.send.deflate.start_auto = 1 +;http.send.deflate.start_flags = HTTP_DEFLATE_LEVEL_DEF + +; automatically inflate sent content +;http.send.inflate.start_auto = 0 +;http.send.inflate.start_flags = + +; global HttpRequestDataShare settings +;http.request.datashare.cookie = 0 +;http.request.datashare.dns = 1 + +; limit of idle persistent handles per provider +;http.persistent.handles.limit = -1 + +; default ident of persistent handles +;http.persistent.handles.ident = "GLOBAL" |