Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 09cde214ea0b91a0b4ae13c4e1b5d0ac > files > 3

php-apc-3.0.19-2mdv2009.0.src.rpm

%define _disable_ld_no_undefined 1

%define realname apc (Alternative PHP Cache)
%define modname apc
%define dirname %{modname}
%define soname %{modname}.so
%define inifile 99_%{modname}.ini

%define _requires_exceptions pear(

Summary:	The %{realname} module for PHP
Name:		php-%{modname}
Version:	3.0.19
Release:	%mkrel 2
Group:		Development/PHP
License:	PHP License
URL:		http://pecl.php.net/package/APC
Source0:	http://pecl.php.net/get/APC-%{version}.tgz
Source1:	apc.ini
BuildRequires:  php-devel >= 3:5.2.0
Conflicts:	php-afterburner php-mmcache php-eaccelerator
Epoch:		1
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
APC was conceived of to provide a way of boosting the performance of PHP on
heavily loaded sites by providing a way for scripts to be cached in a compiled
state, so that the overhead of parsing and compiling can be almost completely
eliminated. There are commercial products which provide this functionality, but
they are neither open-source nor free. Our goal was to level the playing field
by providing an implementation that allows greater flexibility and is
universally accessible. 

We also wanted the cache to provide visibility into it's own workings and those
of PHP, so time was invested in providing internal diagnostic tools which allow
for cache diagnostics and maintenance. 

Thus arrived APC. Since we were committed to developing a product which can
easily grow with new version of PHP, we implemented it as a zend extension,
allowing it to either be compiled into PHP or added post facto as a drop in
module. As with PHP, it is available completely free for commercial
and non-commercial use, under the same terms as PHP itself.

APC has been tested under PHP 4.0.3, 4.0.3pl1 and 4.0.4. It currently compiles
under Linux and FreeBSD. Patches for ports to other OSs/ PHP versions are
welcome.

NOTE!: %{name} has to be loaded last, very important!

This package comes with four different flavours of APC (use only one of them):

 o apc-mmap.so - mmap (fcntl) based locks (default)
 o apc-sem.so - IPC semamphore based locks
 o apc-spinlocks.so - Hardware-dependent implementation of spinlocks
 o apc-pthread.so - NPTL pthread mutex based locks

%package	admin
Summary:	Web admin GUI for %{realname}
Group:		Development/PHP
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires:	apache-mod_php
Requires:	%{name}

%description	admin
This package contains a Web admin GUI for %{realname}.

To access the web GUI please open up your favourite web browser and point to:

http://localhost/%{name}/

%prep

%setup -q -n APC-%{version}
[ "../package*.xml" != "/" ] && mv ../package*.xml .

cp %{SOURCE1} %{inifile}

%build
%serverbuild

phpize

mkdir -p build-apc-mmap
pushd build-apc-mmap
ln -s ../configure .
%configure2_5x \
    --enable-%{modname}=shared,%{_prefix} \
    --enable-apc-filehits \
    --disable-apc-pthreadmutex \
    --disable-apc-sem \
    --disable-apc-futex \
    --disable-apc-spinlocks \
    --enable-apc-mmap

%make
popd

mkdir -p build-apc-sem
pushd build-apc-sem
ln -s ../configure .
%configure2_5x \
    --enable-%{modname}=shared,%{_prefix} \
    --enable-apc-filehits \
    --disable-apc-pthreadmutex \
    --disable-apc-mmap \
    --disable-apc-futex \
    --disable-apc-spinlocks \
    --enable-apc-sem

%make
popd

mkdir -p build-apc-spinlocks
pushd build-apc-spinlocks
ln -s ../configure .
%configure2_5x \
    --enable-%{modname}=shared,%{_prefix} \
    --enable-apc-filehits \
    --disable-apc-pthreadmutex \
    --disable-apc-mmap \
    --disable-apc-futex \
    --disable-apc-sem \
    --disable-apc-mmap \
    --enable-apc-spinlocks

%make
popd

mkdir -p build-apc-pthread
pushd build-apc-pthread
ln -s ../configure .
%configure2_5x \
    --enable-%{modname}=shared,%{_prefix} \
    --enable-apc-filehits \
    --disable-apc-mmap \
    --disable-apc-futex \
    --disable-apc-spinlocks \
    --disable-apc-sem \
    --disable-apc-mmap

%make
popd

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}/php/extensions
install -d %{buildroot}%{_sysconfdir}/php.d
install -d %{buildroot}/var/www/%{name}
install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d

install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile}

install -m0755 build-apc-mmap/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-mmap.so
install -m0755 build-apc-sem/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-sem.so
install -m0755 build-apc-spinlocks/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-spinlocks.so
install -m0755 build-apc-pthread/modules/apc.so %{buildroot}%{_libdir}/php/extensions/apc-pthread.so

cat > %{name}.conf << EOF
Alias /%{name} /var/www/%{name}

<Directory "/var/www/%{name}">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    ErrorDocument 403 "Access denied per %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf"
</Directory>
EOF

install -m0644 %{name}.conf %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/
install -m0644 apc.php %{buildroot}/var/www/%{name}/index.php

%post
if [ -f /var/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart >/dev/null || :
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart >/dev/null || :
    fi
fi

%post admin
%_post_webapp

%postun admin
%_postun_webapp

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc tests CHANGELOG INSTALL LICENSE NOTICE TECHNOTES.txt TODO package*.xml
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
%attr(0755,root,root) %{_libdir}/php/extensions/apc-mmap.so
%attr(0755,root,root) %{_libdir}/php/extensions/apc-sem.so
%attr(0755,root,root) %{_libdir}/php/extensions/apc-spinlocks.so
%attr(0755,root,root) %{_libdir}/php/extensions/apc-pthread.so

%files admin
%defattr(-,root,root)
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/%{name}.conf
%dir /var/www/%{name}
/var/www/%{name}/index.php


%changelog
* Sat Jul 19 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.19-2mdv2009.0
+ Revision: 238637
- use _disable_ld_no_undefined due to lack of time
- rebuild

* Thu May 15 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.19-1mdv2009.0
+ Revision: 207595
- 3.0.19

* Fri May 02 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.18-2mdv2009.0
+ Revision: 200171
- rebuilt for php-5.2.6

* Sat Mar 29 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.18-1mdv2008.1
+ Revision: 191096
- 3.0.18

* Wed Mar 26 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.17-1mdv2008.1
+ Revision: 190233
- 3.0.17 (fixes CVE-2008-1488)

* Mon Feb 04 2008 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.16-2mdv2008.1
+ Revision: 162102
- rebuild

* Thu Dec 27 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.16-1mdv2008.1
+ Revision: 138463
- 3.0.16
- provide two more flavours of the extension and mention it in the description

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Nov 11 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.15-2mdv2008.1
+ Revision: 107602
- restart apache if needed

* Fri Oct 19 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.15-1mdv2008.1
+ Revision: 100285
- 3.0.15

* Sat Sep 01 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.14-5mdv2008.0
+ Revision: 77526
- rebuilt against php-5.2.4

* Thu Jun 14 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.14-4mdv2008.0
+ Revision: 39481
- use distro conditional -fstack-protector

* Fri Jun 01 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.14-3mdv2008.0
+ Revision: 33796
- rebuilt against new upstream version (5.2.3)

* Thu May 03 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.14-2mdv2008.0
+ Revision: 21317
- rebuilt against new upstream version (5.2.2)

* Wed Apr 18 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.14-1mdv2008.0
+ Revision: 14499
- 3.0.14


* Wed Feb 28 2007 Oden Eriksson <oeriksson@mandriva.com> 3.0.13-1mdv2007.0
+ Revision: 127336
- 3.0.13

* Thu Feb 08 2007 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.12p2-5mdv2007.1
+ Revision: 117543
- rebuilt against new upstream version (5.2.1)

* Tue Jan 16 2007 David Walluck <walluck@mandriva.org> 1:3.0.12p2-4mdv2007.1
+ Revision: 109612
- rebuild to fix missing x86-64 package

* Wed Nov 08 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.12p2-3mdv2007.0
+ Revision: 78123
- fix deps
- bunzip the ini file
- fix a better error 404 message

* Wed Nov 08 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.12p2-2mdv2007.0
+ Revision: 78053
-rebuilt for php-5.2.0
- Import php-apc

* Mon Sep 18 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.12p2-1
- 3.0.12p2

* Mon Aug 28 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.11-2
- rebuilt for php-5.1.6

* Tue Aug 22 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.11-1mdv2007.0
- 3.0.11
- updated apc.ini (S1)

* Thu Jul 27 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.10-5mdk
- rebuild

* Tue May 16 2006 Oden Eriksson <oeriksson@mandriva.com> 3.0.10-4mdk
- fix #22482

* Sat May 06 2006 Oden Eriksson <oeriksson@mandriva.com> 3.0.10-3mdk
- rebuilt for php-5.1.3

* Wed Mar 22 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.10-2mdk
- rebuild

* Sun Mar 12 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.10-1mdk
- 3.0.10

* Sun Mar 05 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.9-1mdk
- 3.0.9
- fix apache 2.2.0 config syntax
- use the webapps policy

* Sun Jan 15 2006 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.8-3mdk
- rebuilt against php-5.1.2

* Wed Nov 30 2005 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.8-2mdk
- rebuilt against php-5.1.1

* Sat Nov 26 2005 Oden Eriksson <oeriksson@mandriva.com> 1:3.0.8-1mdk
- rebuilt against php-5.1.0
- fix versioning

* Sun Oct 02 2005 Oden Eriksson <oeriksson@mandriva.com> 5.1.0_3.0.8-1mdk
- rebuilt against php-5.1.0RC1

* Fri Sep 30 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.4_3.0.8-1mdk
- works for php5 too!

* Fri Sep 30 2005 Oden Eriksson <oeriksson@mandriva.com> 4.4.0_3.0.8-1mdk
- 3.0.8
- provide both mmap and ipc based lock enabled builds
- added the web admin sub package

* Tue Jul 12 2005 Oden Eriksson <oeriksson@mandriva.com> 4.4.0-1mdk
- rebuilt for php-4.4.0 final

* Wed Jul 06 2005 Oden Eriksson <oeriksson@mandriva.com> 4.4.0-0.RC2.1mdk
- rebuilt for php-4.4.0RC2

* Wed Jun 15 2005 Oden Eriksson <oeriksson@mandriva.com> 4.4.0_2.0.4-0.RC1.1mdk
- rebuilt for php-4.4.0RC1

* Fri Jun 03 2005 Oden Eriksson <oeriksson@mandriva.com> 4.3.11_2.0.4-1mdk
- renamed to php4-*

* Sun Apr 17 2005 Oden Eriksson <oeriksson@mandriva.com> 4.3.11_2.0.4-1mdk
- 4.3.11

* Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_2.0.4-4mdk
- use the %%mkrel macro

* Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_2.0.4-3mdk
- rebuilt against a non hardened-php aware php lib

* Sat Jan 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_2.0.4-2mdk
- rebuild due to hardened-php-0.2.6
- cleanups

* Thu Dec 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_2.0.4-1mdk
- rebuild for php 4.3.10

* Wed Dec 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.9_2.0.4-2mdk
- make it work

* Sat Oct 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.9_2.0.4-1mdk
- rebuild for php 4.3.9

* Mon Aug 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_2.0.4-2mdk
- make it work again...

* Sun Jul 18 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_2.0.4-1mdk
- 2.0.4

* Thu Jul 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.8_2.0.3-1mdk
- rebuilt for php-4.3.8

* Tue Jul 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.7_2.0.3-2mdk
- remove redundant provides

* Tue Jun 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.7_2.0.3-1mdk
- rebuilt for php-4.3.7

* Mon May 24 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_2.0.3-2mdk
- use the %%configure2_5x macro
- move scandir to /etc/php4.d

* Thu May 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.6_2.0.3-1mdk
- 2.0.3
- fix url
- built for php 4.3.6