File dba-php-534-apc.spec of Package dba-php-534-apc
%define pkg_name        APC
%define real_vers       3.1.6
%define php_version     5.3.4
%define php_vers        534
%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}-apc
Summary: 	Alternative PHP Cache
Version: 	%{real_vers}
Release: 	0
License: 	BSD
Group: 		Productivity/Networking/Web/Servers
URL: 		http://pecl.php.net/package/APC
Source: 	http://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Source1: 	apc.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
#!BuildIgnore:  dba-openssl-098o
%description
APC is a free, open, and robust framework for caching and optimizing PHP
intermediate code.
 Authors:
----------
    George Schlossnagle <george@omniti.com>
    Daniel Cowgill <dan@communityconnect.com>
    Rasmus Lerdorf <rasmus@php.net>
%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-apc-filehits \
  --enable-apc-mmap \
  --with-php-config=%{phpconf} 
%{__make} %{?jobs:-j%jobs}
%check
%if %maketest
%{__make} test PHP_EXECUTABLE=%{phpcmd}
%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/apc.so %{buildroot}%{prefix}/lib/php/extensions/
%{__install} -m 0644 %{S:1} %{buildroot}%{prefix}/conf/apc.ini
%files
%defattr(-,root,root,-)
%dir %{prefix}/conf
%dir %{prefix}/lib/php/extensions
%{prefix}/conf/apc.ini
%{prefix}/lib/php/extensions/apc.so
%changelog
* Mon Jan  3 2011 Holger Manthey <holger.manthey@bertelsmann.de>
- initial package