File dba-php-5415-memcache.spec of Package dba-php-5415-memcache
# norootforbuild
%define pkg memcache
%define real_vers 3.0.8
%define php_version 5.4.15
%define php_vers 5415
%define apavers 2.2.24
%define apapack 2224
%define run_tests 0
%define prefix /DBA/apache/PHP/%{php_version}
%define phpize %{prefix}/bin/phpize
%define phpconf %{prefix}/bin/php-config
Name: dba-php-%{php_vers}-memcache
Summary: PHP Memcache client Extension
Version: %{real_vers}
Release: 1
License: Other/See package
Group: Productivity/Networking/Web/Servers
Packager: Philipp Hellmich <philipp.hellmich@bertelsmann.de>
URL: http://pecl.php.net/package/%{pkg}
Source: http://pecl.php.net/get/%{pkg}-%{version}.tgz
Source1: memcache.ini
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dba-php-%{php_vers} postgresql-devel pcre-devel zlib-devel
%if 0%{?suse_version}
BuildRequires: libmemcache-devel
%else
#BuildRequires: memcached-devel
BuildRequires: libmemcached-devel
%endif
%if 0%{?suse_version} >= 1100
BuildRequires: -post-build-checks
BuildRequires: libopenssl0_9_8
%endif
#!BuildIgnore: dba-openssl-098o
#!BuildIgnore: dba-openssl-098r
%description
Memcached is a caching daemon designed especially for dynamic web applications
to decrease database load by storing objects in memory. This extension allows
you to work with memcached through handy OO and procedural interfaces.
%prep
%setup -q -n %{pkg}-%{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 \
--with-php-config=%{phpconf} \
--with-libdir=%{_lib}
%{__make} %{?jobs:-j%jobs}
%install
%{__make} install INSTALL_ROOT="%{buildroot}"
%{__install} -D -m 0644 %{S:1} %{buildroot}%{prefix}/conf/%{pkg}.ini
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%dir %{prefix}/lib/php/extensions
%{prefix}/lib/php/extensions/memcache.so
%config(noreplace) %{prefix}/conf/%{pkg}.ini
%changelog
* Sat Jan 7 2012 Holger Manthey <holger.manthey@bertelsmann.de>
- initial package