Logoj0ke.net Open Build Service > Projects > internetx:php5:extensions > php5-pecl_http > Changes
Sign Up | Log In

Changes of Revision 36

[-] Changed php5-pecl_http.spec
x
 
1
@@ -4,11 +4,15 @@
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
@@ -27,7 +31,11 @@
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
@@ -55,7 +63,7 @@
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
@@ -89,7 +97,7 @@
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
@@ -113,9 +121,15 @@
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
@@ -124,7 +138,7 @@
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 ^