LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dba-php-5320-eaccelerator.spec of Package dba-php-5320-eaccelerator (Project home:csbuild:DBA)

%define pkg_name        eaccelerator
%define real_vers       0.9.6.1

%define php_version     5.3.20
%define php_vers        5320

%define prefix          /DBA/apache/PHP/%{php_version}
%define phpcmd          %{prefix}/bin/php
%define phpize          %{prefix}/bin/phpize
%define phpconf         %{prefix}/bin/php-config
%define maketest        0

Name:           dba-php-%{php_vers}-%{pkg_name}
Summary: 	eAccelerator is a free open-source PHP accelerator & optimizer
Version: 	%{real_vers}
Release: 	0
License: 	BSD
Group: 		Productivity/Networking/Web/Servers
URL: 		http://eaccelerator.net/
Source: 	http://bart.eaccelerator.net/source/%{real_vers}/%{pkg_name}-%{real_vers}.tar.bz2
Source1: 	%{pkg_name}.ini
BuildRoot: 	%{_tmppath}/%{pkg_name}-%{real_vers}-build

%if 0%{?suse_version} >= 1100
BuildRequires:  -post-build-checks
%endif

BuildRequires:  dba-php-%{php_vers}
#!BuildIgnore:  dba-postgresql-839 dba-postgresql-842 dba-postgresql-845 dba-postgresql-846 dba-postgresql-904 dba-postgresql-910
#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c


%description
eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.


%prep
%setup -q -n %{pkg_name}-%{real_vers}


%build
CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fno-strict-aliasing"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif

export CFLAGS
export CXXFLAGS

%{phpize}

%configure \
  --enable-eaccelerator=shared \
  --with-eaccelerator-doc-comment-inclusion \
  --with-php-config=%{phpconf} 

%{__make} %{?jobs:-j%jobs}


%check
%if %maketest
%{__make} test PHP_EXECUTABLE=/usr/bin/php5
%endif


%clean
%{__rm} -rf %{buildroot}


%install
# %makeinstall INSTALL_ROOT=%{buildroot}
%{__mkdir_p} %{buildroot}%{prefix}/conf
%{__mkdir_p} %{buildroot}%{prefix}/lib/php/extensions
%{__install} -m 0755 ./.libs/%{pkg_name}.so %{buildroot}%{prefix}/lib/php/extensions/
%{__install} -m 0644 %{S:1} %{buildroot}%{prefix}/conf/%{pkg_name}.ini


%files
%defattr(-,root,root,-)
%dir %{prefix}/conf
%dir %{prefix}/lib/php/extensions
%{prefix}/conf/%{pkg_name}.ini
%{prefix}/lib/php/extensions/%{pkg_name}.so


%changelog
* Wed Jan  9 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- initial package