File php5-expect.spec of Package php5-expect
x
1
# norootforbuild
2
%define pkg_name expect
3
%define pkg_version 0.3.3
4
%define php_version %(php-config --version 2>/dev/null)
5
#
6
Name: php5-expect
7
Version: %{pkg_version}
8
Release: 0
9
#
10
License: PHP
11
Group: Productivity/Networking/Web/Servers
12
#
13
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-build
14
BuildRequires: php5-devel
15
BuildRequires: expect >= 5.43.0
16
BuildRequires: expect-devel >= 5.43.0
17
BuildRequires: gcc
18
BuildRequires: gcc-c++
19
BuildRequires: tcl-devel
20
Requires: php5 = %{php_version}
21
#
22
URL: http://pecl.php.net/
23
Source: http://pecl.php.net/package/%{pkg_name}/%{pkg_name}-%{version}.tgz
24
Patch0: expect-x86_64_%{version}.patch
25
Summary: Expect extension
26
27
%description
28
This extension allows to interact with processes through PTY, using expect library.
29
30
Authors:
31
---------
32
33
Michael Spector
34
35
%debug_package
36
37
%prep
38
%setup -n %{pkg_name}-%{version}
39
%patch0
40
41
%{__mkdir} %{name}
42
43
%build
44
/usr/bin/phpize
45
46
CFLAGS="%{optflags} -fno-strict-aliasing"
47
CXXFLAGS="%{optflags} -fno-strict-aliasing"
48
%if 0%{?suse_version} > 1000
49
CFLAGS="$CFLAGS -fstack-protector"
50
CXXFLAGS="$CXXFLAGS -fstack-protector"
51
%endif
52
53
#export CFLAGS
54
#export CXXFLAGS
55
export LDFLAGS="-L%{_libdir}"
56
57
./configure --with-expect=%{_usr} --with-tcldir=%{_libdir}
58
59
%{__make} %{?jobs:-j%jobs} || ls -al %{_libdir} && rpm -ql expect-devel
60
61
%install
62
%makeinstall INSTALL_ROOT=%{buildroot}
63
%{__mkdir} -p %{buildroot}%{_sysconfdir}/php5/conf.d
64
echo "; comment out next line to disable expect extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/expect.ini
65
echo "extension = expect.so" >> %{buildroot}%{_sysconfdir}/php5/conf.d/expect.ini
66
67
68
%clean
69
%{__rm} -rf %{buildroot}
70
71
%files
72
%defattr(-,root,root,-)
73
%{_libdir}/php5/extensions/expect.so
74
%config(noreplace) %{_sysconfdir}/php5/conf.d/expect.ini
75
76
%changelog
77