Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37533407
en ru br
ALT Linux repos
4.1: 2.4.6-alt11.M41.1
4.0:
+backports:2.4.6-alt10
3.0: 2.4.6-alt8

Group :: System/Servers
RPM: php-mmcache

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define use_mod_php 1
%define use_con_php 1

# Package name without php prefix

%define package_name mmcache
%define php_extension   mmcache
###############################################################

%define phpver %(rpm -q --queryformat '%%{VERSION}' php-devel)
%define phprel %(rpm -q --queryformat '%%{RELEASE}' php-devel)
%define phpser %(rpm -q --queryformat '%%{SERIAL}'  php-devel)

#%define phpini %_sysconfdir/httpd/conf/php.ini

%set_automake_version 1.7

Name: php-mmcache
Version: 2.4.6
Release: alt10

Summary: Turck MMCache for PHP
License: GPL
Group: System/Servers

Url: http://turck-mmcache.sourceforge.net/
Packager: Michael Shigorin <mike at altlinux.org>

Source: php-mmcache-%version.tar.bz2
Source1: turck-mmcache.ini
Source2: mmcache.png
Patch0: turck-mmcache-2.3.10-cache_file_location.patch.bz2

PreReq: php-libs = %get_SVR php-libs
Conflicts: php-afterburner php-apc

%add_serial php-devel

# Automatically added by buildreq on Sun Aug 31 2003

#BuildRequires: gcc-c++ libstdc++-devel php-devel
BuildRequires: php-devel gcc automake_1.7

%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.

Since the version 2.3.10, Turck MMCache contains PHP encoder and
loader. You can encode any PHP scripts with encoder.php to
distribute them without sources.

%prep
%setup -q -n php-mmcache-%version
%patch0 -p0 -b .cache_file_location

%build
phpize
#aclocal
CFLAGS="%optflags -fPIC -L%_libdir"
#configure \
#   --with-mmcache-crash-detection \
#   --with-mmcache-optimizer \
#   --with-mmcache-encoder \
#   --with-mmcache-loader \
#   --with-mmcache-sessions \
#   --with-mmcache-content-caching \
#   --with-mmcache-disassembler \
#   --with-mmcache-executor
%configure \
--enable-mmcache=shared \
--with-php-config=%_bindir/php-config \
--with-mmcache-crash-detection
%make

%install
%php_make_install

install -d %buildroot{%_bindir,%_sysconfdir/php}
install -d %buildroot{%_libdir/php/extensions,%_cachedir/php-mmcache}
install -d %buildroot%_var/www/{icons,html/admin/php-mmcache}

install -D -m 644 %SOURCE1 %buildroot/%php_extconf/%php_extension/config

#install -m755 modules/*.so %buildroot/%php_extdir


install -m755 encoder.php %buildroot%_bindir/mmcache-encoder
install -m644 mmcache.php %buildroot/var/www/html/admin/php-mmcache/index.php
install -m644 mmcache_password.php %buildroot/var/www/html/admin/php-mmcache/mmcache_password.php
#__bzip2 -dc < %SOURCE1 > %buildroot%_sysconfdir/php/99_mmcache.ini
install -m644 -D %SOURCE1 %buildroot%php_sysconfdir/mod_php/php.d/mmcache.ini
install -m644 %SOURCE2 %buildroot/var/www/icons/mmcache.png

%files
%doc CREDITS EXPERIMENTAL README* TODO
%php_sysconfdir/mod_php/php.d/mmcache.ini
%php_extdir/*
%_bindir/mmcache-encoder
%_var/www/html/admin/php-mmcache/index.php
%_var/www/html/admin/php-mmcache/mmcache_password.php
%_var/www/icons/mmcache.png
%dir %_cachedir/php-mmcache

%post
%php_extension_postin

%preun
%php_extension_preun

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin