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

File php5-pecl_http.spec of Package php5-pecl_http

x
 
1
# norootforbuild
2
%define     pkg_name    pecl_http
3
%define     pkg_version %(php-config --version | awk -F. '{print $1"."$2 }' 2>/dev/null || echo PHPCONFIG_NOT_FOUND)
4
%define     php_version %(php-config --version 2>/dev/null)
5
%if "%{pkg_version}" >= "5.6"
6
%define     my_version 2.4.3
7
%define     upstream 1
8
BuildRequires:  libevent-devel
9
BuildRequires:  php5-raphf
10
BuildRequires:  php5-propro
11
Requires:   php5-raphf
12
Requires:   php5-propro
13
%else
14
%define     my_version 1.7.6
15
%define     upstream 0
16
%endif
17
#
18
Name:       php5-pecl_http
19
Version:    %{my_version}
20
Release:    0
21
#
22
License:    BSD
23
Group:      Productivity/Networking/Web/Servers
24
#
25
BuildRoot:  %{_tmppath}/%{pkg_name}-%{version}-build
26
27
#yes, PHP modules are required for build, as configure tests it's precence, to enable
28
#or disable features.
29
BuildRequires:  php-devel curl-devel file-devel libevent php-iconv php-hash
30
BuildRequires:  pkg-config libevent-devel libidn-devel libicu-devel
31
Requires:   php5 = %{php_version} php-iconv php-hash
32
#
33
URL:        http://pecl.php.net/pecl_http
34
Source:     http://pecl.php.net/package/pecl_http/%{pkg_name}-%{my_version}.tar.bz2
35
%if "%{upstream}" == "0"
36
Source1:    http.ini
37
%else
38
Source1:    http-2.4.3.ini
39
%endif
40
Patch0:     pecl_http-2.4.3_debug.patch
41
Summary:    Extended HTTP Support
42
43
%description
44
45
Extended HTTP Support
46
47
Authors:
48
---------
49
    Michael Wallner <mike@php.net>
50
51
%package        devel
52
Summary:        Include files of php5-pecl_http
53
Group:          Development/Libraries/C and C++
54
Requires:       %{name} = %{my_version} php5-devel curl-devel file-devel libevent
55
56
%description   devel
57
58
Extended HTTP Support
59
60
Authors:
61
---------
62
    Michael Wallner <mike@php.net>
63
64
65
%prep
66
%setup -q -n %{pkg_name}-%{my_version}
67
%if "%{upstream}" == "1"
68
%patch0
69
%endif
70
71
#%{__mkdir} %{name}
72
73
%build
74
if [ -x /usr/bin/php ] ; then
75
export PHP_EXECUTABLE="/usr/bin/php"
76
elif [ -x /usr/bin/php5 ] ; then
77
export PHP_EXECUTABLE="/usr/bin/php5"
78
else
79
export PHP_EXECUTABLE="/usr/local/bin/php"
80
fi
81
82
/usr/bin/phpize
83
#pushd %{name}
84
85
CFLAGS="%{optflags} -fno-strict-aliasing"
86
CXXFLAGS="%{optflags} -fno-strict-aliasing"
87
88
%if 0%{?suse_version} > 1000
89
CFLAGS="$CFLAGS -fstack-protector"
90
CXXFLAGS="$CXXFLAGS -fstack-protector"
91
%endif
92
93
export CFLAGS
94
export CXXFLAGS
95
96
%configure \
97
--with-php=$PHP_EXECUTABLE \
98
--with-http-magic-mime=%{_usr} \
99
--with-http-zlib-compression=%{_usr} \
100
--with-http-curl-requests=%{_usr} \
101
%if "%{upstream}" == "1"
102
--without-http-shared-deps \
103
%else
104
--with-http-shared-deps \
105
%endif
106
--with-libdir=%{_lib} || cat config.log
107
$PHP_EXECUTABLE -v
108
$PHP_EXECUTABLE -m
109
110
%{__make} %{?jobs:-j%jobs}
111
112
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
113
114
%{__make} test
115
116
unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
117
118
%install
119
120
%makeinstall INSTALL_ROOT=%{buildroot}
121
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php5/conf.d
122
%{__install} -m 644 %{S:1} %{buildroot}%{_sysconfdir}/php5/conf.d/http.ini
123
124
%clean
125
%{__rm} -rf %{buildroot}
126
127
%post
128
for file in /etc/php5/conf.d/propro.ini /etc/php5/conf.d/raphf.ini ; do
129
 if [ -f ${file} ] ; then
130
  sed -i -r s@"^(extension\s?=.*)"@";\1"@ ${file}
131
 fi
132
done
133
134
%files
135
%defattr(-,root,root,-)
136
%{_libdir}/php5/extensions/http.so
137
%config(noreplace) %{_sysconfdir}/php5/conf.d/http.ini
138
139
%files devel
140
%defattr(-,root,root,-)
141
%dir %{_includedir}/php5/ext/http
142
%if "%{upstream}" == "0"
143
%dir %{_includedir}/php5/ext/http/phpstr
144
%{_includedir}/php5/ext/http/*.h
145
%{_includedir}/php5/ext/http/phpstr/*.h
146
%doc lib
147
%else
148
%{_includedir}/php5/ext/http/php_*.h
149
%endif
150
%doc LICENSE CREDITS KnownIssues.txt
151
152
%changelog -n php5-pecl_http
153
* Thu Dec 10 2009 Carsten Schoene <cs@linux-administrator.com> - 1.6.6-0
154
- new release 1.6.6
155
* Fri Aug 14 2009 Carsten Schoene <cs@linux-administrator.com> - 1.6.5-0
156
- new release 1.6.5
157
* Fri Jul 24 2009 Carsten Schoene <cs@linux-administrator.com> - 1.6.4-0
158
- new release 1.6.4
159
* Thu Feb 12 2009 Carsten Schoene <cs@linux-administrator.com>
160
- new release 1.6.3
161
* Fri Dec 05 2008 Carsten Schoene <cs@linux-administrator.com>
162
- version bump to 1.6.2
163
* Wed Jul 23 2008 Carsten Schoene <cs@linux-administrator.com>
164
- version bump to 1.6.1
165
* Sun Feb 25 2007 - judas_iscariote@shorewall.net
166
- version bump to 1.5.2 
167
* Wed Feb 21 2007 - judas_iscariote@shorewall.net
168
- version 1.5.1 solves compile problems in older PHP versions.
169
* Tue Feb 20 2007 - judas_iscariote@shorewall.net
170
- update to version 1.5.0
171
* Sun Jan 29 2007 - judas_iscariote@shorewall.net
172
- update to 1.4.1
173
* Tue Jan 23 2007 - judas_iscariote@shorewall.net
174
- Update to 1.4.0 final.
175
* Mon Dec 11 2006 - judas_iscariote@shorewall.net
176
- we need to export php executable name and add php5-hash and php5-iconv to BuildRequires
177
* Thu Nov 09 2006 - soporte@onfocus.cl
178
- very first build
179