Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 486903c879571663c5040aa15234e91d > files > 1

php-mmcache-4.3.1_2.3.7-1mdk.src.rpm

%define phpsource       %{_prefix}/src/php-devel
%{expand:%(cat /usr/src/php-devel/PHP_BUILD||(echo -e "error: failed build dependencies:\n        php-devel >= 430 (4.3.0) is needed by this package." >/dev/stderr;kill -2 $PPID))}

%define rversion 2.3.7
%define release	1mdk

%define realname mmcache
%define modname mmcache
%define dirname %{modname}
%define soname %{modname}.so
%define inifile 99_%{modname}.ini

Summary:	Turck MMCache is a opcode cache for PHP
Name:		php-%{modname}
Version:	%{phpversion}_%{rversion}
Release:	%{release}
Group:		System/Servers
URL:		http://www.turcksoft.com/en/e_mmc.htm
License:	GPL
Source0:	turck-mmcache-%{rversion}.tar.bz2
Source1:	turck-mmcache.ini.bz2
Requires:	libphp_common%{libversion}
Requires:	php%{libversion}
Requires:	libmm1
BuildRequires:  php%{libversion}-devel
BuildRequires:	libmm1-devel
BuildRoot:	%{_tmppath}/%{name}-root
Provides: 	ADVXpackage
Conflicts:	php-afterburner php-apc

%description
Turck MMCache is a opcode cache for PHP. It increases performance 
of PHP scripts by caching them in compiled state, so that the 
overhead of compiling is almost completely eliminated. Also it 
uses some optimizations for speed up of PHP scripts execution. 
Turck MMCache typically reduces server load and increases the 
speed of your PHP code by 1-10 times. 

%prep

%setup -q -n turck-mmcache-%{rversion}

%build

# fix strange file permissions
chmod 644 *

phpize
aclocal
%configure --enable-mmcache=shared
%make
mv modules/*.so .

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

install -d %{buildroot}%{phpdir}/extensions
install -d %{buildroot}%{_sysconfdir}/php
install -d %{buildroot}/var/www/html/admin
install -d %{buildroot}/var/cache/php-%{modname}

cat > README.%{modname} << EOF
The %{name} package contains a dynamic shared object (DSO) for PHP. 
EOF

bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/php/%{inifile}
install -m755 %{soname} %{buildroot}%{phpdir}/extensions/

install -m644 mmcache.php %{buildroot}/var/www/html/admin/

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

%files 
%defattr(-,root,root)
%doc CREDITS EXPERIMENTAL README TODO README.%{modname}
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php/%{inifile}
%{phpdir}/extensions/%{soname}
%attr(0644,root,root) /var/www/html/admin/mmcache.php
%dir %attr(0777,apache,apache) /var/cache/php-%{modname}

%changelog
* Thu Mar 06 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.1_2.3.7-1mdk
- 2.3.7
- fix S1 and add cache dir

* Tue Mar 04 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.1_2.3.6-1mdk
- 2.3.6
- misc spec file fixes

* Wed Feb 26 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.1_2.3.5-1mdk
- 2.3.5
- updated S1

* Wed Feb 19 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.1_2.3.3-1mdk
- rebuilt against php-4.3.1

* Sat Feb 08 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.3.0_2.3.3-1mdk
- initial cooker contrib