Sisyphus repository
Last update: 17 may 2022 | SRPMs: 17602 | Visits: 23630449
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)

%set_automake_version 1.7

Name: php-mmcache
Version: 2.4.6
Release: alt11.M41.1

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
Source3: mmcache.htaccess
Patch0: turck-mmcache-2.3.10-cache_file_location.patch.bz2

PreReq: php-libs = %php_version-%php_release
Conflicts: php-afterburner php-apc

%add_serial php-devel

BuildRequires: apache-devel 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.

NB: if you plan to use MMcache within OpenVZ VE, pay attention
to shmpages limit!

%package admin
Summary: Turck MMCache admin frontend
License: GPL
Group: System/Servers
Requires: %name = %version-%release

%description admin
This package contains stats script and password change script
for Turck MMCache.  It is allowed to be accessed from localhost
only by default, please take care not to make these publicly
accessible in known locations.

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

%build
phpize
CFLAGS="%optflags -fPIC -L%_libdir"
%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{%apache_datadir/icons,%apache_htdocsdir/admin/php-mmcache}

install -d %buildroot{%_cachedir/php-mmcache,%apache_htdocsdir/admin/php-mmcache}
install -pD -m644 %SOURCE1 %buildroot/%php_extconf/%php_extension/config
install -pD -m755 encoder.php %buildroot%_bindir/mmcache-encoder
install -pD -m644 mmcache.php %buildroot%apache_htdocsdir/admin/php-mmcache/index.php
install -pD -m644 mmcache_password.php %buildroot%apache_htdocsdir/admin/php-mmcache/mmcache_password.php
install -pD -m644 %SOURCE1 %buildroot%php_sysconfdir/apache-mod_php/php.d/mmcache.ini
install -pD -m644 %SOURCE2 %buildroot%apache_datadir/icons/mmcache.png
install -pD -m644 %SOURCE3 %buildroot%apache_htdocsdir/admin/php-mmcache/.htaccess

%files
%doc CREDITS EXPERIMENTAL README* TODO
%attr(0640,root,%apache_group) %config(noreplace) %php_sysconfdir/apache-mod_php/php.d/mmcache.ini
%php_extdir/*
%_bindir/mmcache-encoder
%attr(0770,%apache_user,%apache_group) %dir %_cachedir/php-mmcache

%files admin
%apache_htdocsdir/admin/php-mmcache/index.php
%apache_htdocsdir/admin/php-mmcache/mmcache_password.php
%apache_htdocsdir/admin/php-mmcache/.htaccess
%apache_datadir/icons/mmcache.png

%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