wok-next view eaccelerator/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents d958fec46c9f
children
line source
1 # SliTaz package receipt.
3 PACKAGE="eaccelerator"
4 VERSION="0.9.6.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="PHP accelerator, optimizer, and dynamic content cache"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://eaccelerator.net/"
10 REPOLOGY="php:eaccelerator"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="http://bart.eaccelerator.net/source/$VERSION/$TARBALL"
15 BUILD_DEPENDS="php-dev sed coreutils-conditions" # gawk re2c
17 compile_rules() {
18 export PHP_PREFIX="/usr"
19 $PHP_PREFIX/bin/phpize
20 ./configure --enable-eaccelerator=shared \
21 --with-php-config=$PHP_PREFIX/bin/php-config \
22 --prefix=/usr --infodir=/usr/share/info \
23 --mandir=/usr/share/man $CONFIGURE_ARGS &&
24 make &&
25 make INSTALL_ROOT=$install install
26 }
28 genpkg_rules() {
29 mkdir -p $fs/tmp/eaccelerator $fs/usr/share/php
30 cp $(find $install | grep eaccelerator.so) $fs/usr/share/php/
31 chmod 0777 $fs/tmp/eaccelerator
32 DEPENDS="php m4"
33 TAGS="php"
34 }
36 post_install() {
37 grep -q ^extension=msql.so "$1/etc/php.ini" || \
38 sed -e 's|;.*extension=msql.so|; extension=msql.so\nextension=eaccelerator.so\neaccelerator.shm_size="48"\neaccelerator.cache_dir="/tmp/eaccelerator"\neaccelerator.enable="1"\neaccelerator.optimizer="1"\neaccelerator.check_mtime="1"\neaccelerator.debug="0"\neaccelerator.filter=""\neaccelerator.shm_max="0"\neaccelerator.shm_ttl="0"\neaccelerator.shm_prune_period="0"\neaccelerator.shm_only="0"\neaccelerator.compress="1"\neaccelerator.compress_level="9"|' -i "$1/etc/php.ini"
40 # Start Web server.
41 while read daemon file; do
42 if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
43 /etc/init.d/$daemon start
44 fi
45 done <<EOT
46 apache apache/httpd.pid
47 lighttpd lighttpd.pid
48 EOT
49 }
51 pre_remove() {
52 sed -i '/.*eaccelerator.*/d' /etc/php.ini
54 # Start Web server.
55 while read daemon file; do
56 if [ -z "$1" -a -f /etc/init.d/$daemon \
57 -a ! -f "/var/run/$file" ]; then
58 /etc/init.d/$daemon start
59 fi
60 done <<EOT
61 apache apache/httpd.pid
62 lighttpd lighttpd.pid
63 EOT
64 }